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;
}
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