Commit 54fef245 by Richard Henderson Committed by Richard Henderson

calls.c (expand_call): Defer const/pure NO_DEFER_POP until after sibcall do_pending_stack_adjust.

        * calls.c (expand_call): Defer const/pure NO_DEFER_POP until
        after sibcall do_pending_stack_adjust.

From-SVN: r37836
parent f423a6a7
2000-11-28 Richard Henderson <rth@redhat.com>
* calls.c (expand_call): Defer const/pure NO_DEFER_POP until
after sibcall do_pending_stack_adjust.
Wed Nov 29 00:08:23 2000 J"orn Rennecke <amylaar@redhat.com> Wed Nov 29 00:08:23 2000 J"orn Rennecke <amylaar@redhat.com>
* jump.c (delete_insn): Check that REG_LABEL note actually contains * jump.c (delete_insn): Check that REG_LABEL note actually contains
......
...@@ -2657,11 +2657,6 @@ expand_call (exp, target, ignore) ...@@ -2657,11 +2657,6 @@ expand_call (exp, target, ignore)
expand_start_target_temps (); expand_start_target_temps ();
} }
/* When calling a const function, we must pop the stack args right away,
so that the pop is deleted or moved with the call. */
if (flags & (ECF_CONST | ECF_PURE))
NO_DEFER_POP;
/* Don't let pending stack adjusts add up to too much. /* Don't let pending stack adjusts add up to too much.
Also, do all pending adjustments now if there is any chance Also, do all pending adjustments now if there is any chance
this might be a call to alloca or if we are expanding a sibling this might be a call to alloca or if we are expanding a sibling
...@@ -2671,6 +2666,11 @@ expand_call (exp, target, ignore) ...@@ -2671,6 +2666,11 @@ expand_call (exp, target, ignore)
|| pass == 0) || pass == 0)
do_pending_stack_adjust (); do_pending_stack_adjust ();
/* When calling a const function, we must pop the stack args right away,
so that the pop is deleted or moved with the call. */
if (flags & (ECF_CONST | ECF_PURE))
NO_DEFER_POP;
/* Push the temporary stack slot level so that we can free any /* Push the temporary stack slot level so that we can free any
temporaries we make. */ temporaries we make. */
push_temp_slots (); push_temp_slots ();
......
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