summaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2011-03-03 13:56:58 -0800
committerRichard Henderson <rth@gcc.gnu.org>2011-03-03 13:56:58 -0800
commit9eac0f2a07b6e919feacfcd30c19a3058dd58e01 (patch)
tree1bc97a08baf05002d630ce3689e67be7e0a590fb /gcc/explow.c
parentdfee1406b912a5d6fa1d199414121e8c8c8e265d (diff)
downloadgcc-9eac0f2a07b6e919feacfcd30c19a3058dd58e01.tar.gz
explow.c (emit_stack_save): Remove 'after' parameter.
* explow.c (emit_stack_save): Remove 'after' parameter. (emit_stack_restore): Likewise. * expr.h: Update to match. * builtins.c, calls.c, stmt.c: Likewise. * config/alpha/alpha.md, config/avr/avr.md: Likewise. * config/mips/mips.md, config/pa/pa.md, config/vax/vax.md: Likewise. * function.c (expand_function_end): Insert the emit_stack_save sequence before parm_birth_insn instead of after. From-SVN: r170663
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c55
1 files changed, 10 insertions, 45 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index 2a182065bca..34adcb93281 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -961,13 +961,10 @@ round_push (rtx size)
/* Save the stack pointer for the purpose in SAVE_LEVEL. PSAVE is a pointer
to a previously-created save area. If no save area has been allocated,
this function will allocate one. If a save area is specified, it
- must be of the proper mode.
-
- The insns are emitted after insn AFTER, if nonzero, otherwise the insns
- are emitted at the current position. */
+ must be of the proper mode. */
void
-emit_stack_save (enum save_level save_level, rtx *psave, rtx after)
+emit_stack_save (enum save_level save_level, rtx *psave)
{
rtx sa = *psave;
/* The default is that we use a move insn and save in a Pmode object. */
@@ -1013,38 +1010,17 @@ emit_stack_save (enum save_level save_level, rtx *psave, rtx after)
}
}
- if (after)
- {
- rtx seq;
-
- start_sequence ();
- do_pending_stack_adjust ();
- /* We must validize inside the sequence, to ensure that any instructions
- created by the validize call also get moved to the right place. */
- if (sa != 0)
- sa = validize_mem (sa);
- emit_insn (fcn (sa, stack_pointer_rtx));
- seq = get_insns ();
- end_sequence ();
- emit_insn_after (seq, after);
- }
- else
- {
- do_pending_stack_adjust ();
- if (sa != 0)
- sa = validize_mem (sa);
- emit_insn (fcn (sa, stack_pointer_rtx));
- }
+ do_pending_stack_adjust ();
+ if (sa != 0)
+ sa = validize_mem (sa);
+ emit_insn (fcn (sa, stack_pointer_rtx));
}
/* Restore the stack pointer for the purpose in SAVE_LEVEL. SA is the save
- area made by emit_stack_save. If it is zero, we have nothing to do.
-
- Put any emitted insns after insn AFTER, if nonzero, otherwise at
- current position. */
+ area made by emit_stack_save. If it is zero, we have nothing to do. */
void
-emit_stack_restore (enum save_level save_level, rtx sa, rtx after)
+emit_stack_restore (enum save_level save_level, rtx sa)
{
/* The default is that we use a move insn. */
rtx (*fcn) (rtx, rtx) = gen_move_insn;
@@ -1086,18 +1062,7 @@ emit_stack_restore (enum save_level save_level, rtx sa, rtx after)
discard_pending_stack_adjust ();
- if (after)
- {
- rtx seq;
-
- start_sequence ();
- emit_insn (fcn (stack_pointer_rtx, sa));
- seq = get_insns ();
- end_sequence ();
- emit_insn_after (seq, after);
- }
- else
- emit_insn (fcn (stack_pointer_rtx, sa));
+ emit_insn (fcn (stack_pointer_rtx, sa));
}
/* Invoke emit_stack_save on the nonlocal_goto_save_area for the current
@@ -1118,7 +1083,7 @@ update_nonlocal_goto_save_area (void)
integer_one_node, NULL_TREE, NULL_TREE);
r_save = expand_expr (t_save, NULL_RTX, VOIDmode, EXPAND_WRITE);
- emit_stack_save (SAVE_NONLOCAL, &r_save, NULL_RTX);
+ emit_stack_save (SAVE_NONLOCAL, &r_save);
}
/* Return an rtx representing the address of an area of memory dynamically