Commit cea05fab by Michael Meissner

Fix alloca on NT

From-SVN: r11280
parent 10568ad0
......@@ -6336,9 +6336,10 @@
if (DEFAULT_ABI == ABI_NT
&& (GET_CODE (operands[0]) != CONST_INT || INTVAL (operands[0]) > 4096))
{
emit_library_call (gen_rtx (SYMBOL_REF, Pmode, \"__allocate_stack\"), 0,
VOIDmode, 1,
operands[0], Pmode);
rtx tmp = gen_reg_rtx (SImode);
emit_library_call_value (gen_rtx (SYMBOL_REF, Pmode, \"__allocate_stack\"),
tmp, 0, SImode, 1, operands[0], Pmode);
emit_insn (gen_set_sp (tmp));
DONE;
}
......@@ -6363,6 +6364,16 @@
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
;; save the stack pointer at function level since we are careful to
;; 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