+/* Controls the behaviour of {anti_,}adjust_stack. */
+static bool suppress_reg_args_size;
+
+/* A helper for adjust_stack and anti_adjust_stack. */
+
+static void
+adjust_stack_1 (rtx adjust, bool anti_p)
+{
+ rtx temp, insn;
+
+#ifndef STACK_GROWS_DOWNWARD
+ /* Hereafter anti_p means subtract_p. */
+ anti_p = !anti_p;
+#endif
+
+ temp = expand_binop (Pmode,
+ anti_p ? sub_optab : add_optab,
+ stack_pointer_rtx, adjust, stack_pointer_rtx, 0,
+ OPTAB_LIB_WIDEN);
+
+ if (temp != stack_pointer_rtx)
+ insn = emit_move_insn (stack_pointer_rtx, temp);
+ else
+ {
+ insn = get_last_insn ();
+ temp = single_set (insn);
+ gcc_assert (temp != NULL && SET_DEST (temp) == stack_pointer_rtx);
+ }
+
+ if (!suppress_reg_args_size)
+ add_reg_note (insn, REG_ARGS_SIZE, GEN_INT (stack_pointer_delta));
+}
+