aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/stmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/stmt.c')
-rw-r--r--gcc-4.8/gcc/stmt.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc-4.8/gcc/stmt.c b/gcc-4.8/gcc/stmt.c
index 7bdc9329b..ce90206f8 100644
--- a/gcc-4.8/gcc/stmt.c
+++ b/gcc-4.8/gcc/stmt.c
@@ -1602,19 +1602,28 @@ expand_nl_goto_receiver (void)
#ifdef HAVE_nonlocal_goto
if (! HAVE_nonlocal_goto)
#endif
+ {
/* First adjust our frame pointer to its actual value. It was
previously set to the start of the virtual area corresponding to
the stacked variables when we branched here and now needs to be
adjusted to the actual hardware fp value.
- Assignments are to virtual registers are converted by
+ Assignments to virtual registers are converted by
instantiate_virtual_regs into the corresponding assignment
to the underlying register (fp in this case) that makes
the original assignment true.
- So the following insn will actually be
- decrementing fp by STARTING_FRAME_OFFSET. */
+ So the following insn will actually be decrementing fp by
+ STARTING_FRAME_OFFSET. */
emit_move_insn (virtual_stack_vars_rtx, hard_frame_pointer_rtx);
+ /* Restoring the frame pointer also modifies the hard frame pointer.
+ Mark it used (so that the previous assignment remains live once
+ the frame pointer is eliminated) and clobbered (to represent the
+ implicit update from the assignment). */
+ emit_use (hard_frame_pointer_rtx);
+ emit_clobber (hard_frame_pointer_rtx);
+ }
+
#if !HARD_FRAME_POINTER_IS_ARG_POINTER
if (fixed_regs[ARG_POINTER_REGNUM])
{