Commit cea05fab by Michael Meissner

Fix alloca on NT

From-SVN: r11280
parent 10568ad0
...@@ -6336,9 +6336,10 @@ ...@@ -6336,9 +6336,10 @@
if (DEFAULT_ABI == ABI_NT if (DEFAULT_ABI == ABI_NT
&& (GET_CODE (operands[0]) != CONST_INT || INTVAL (operands[0]) > 4096)) && (GET_CODE (operands[0]) != CONST_INT || INTVAL (operands[0]) > 4096))
{ {
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, \"__allocate_stack\"), 0, rtx tmp = gen_reg_rtx (SImode);
VOIDmode, 1, emit_library_call_value (gen_rtx (SYMBOL_REF, Pmode, \"__allocate_stack\"),
operands[0], Pmode); tmp, 0, SImode, 1, operands[0], Pmode);
emit_insn (gen_set_sp (tmp));
DONE; DONE;
} }
...@@ -6363,6 +6364,16 @@ ...@@ -6363,6 +6364,16 @@
DONE; DONE;
}") }")
;; Marker to indicate that the stack pointer was changed under NT in
;; ways not known to the compiler
(define_insn "set_sp"
[(set (reg:SI 1)
(unspec [(match_operand:SI 0 "register_operand" "r")] 7))]
""
""
[(set_attr "length" "0")])
;; These patterns say how to save and restore the stack pointer. We need not ;; These patterns say how to save and restore the stack pointer. We need not
;; save the stack pointer at function level since we are careful to ;; save the stack pointer at function level since we are careful to
;; preserve the backchain. At block level, we have to restore the backchain ;; preserve the backchain. At block level, we have to restore the backchain
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment