diff options
author | Waldek Hebisch <hebisch@math.uni.wroc.pl> | 2003-12-05 12:11:08 +0100 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-12-05 03:11:08 -0800 |
commit | e292dbb06b68cd9f03055dff06de8989715ac2b8 (patch) | |
tree | f2a8d9cb58beed3a710c192bcb0534e8ac50f597 /gcc/stmt.c | |
parent | 84f47d5f223ee48685a4c05fca7cdcdfbec895d7 (diff) | |
download | gcc-e292dbb06b68cd9f03055dff06de8989715ac2b8.zip gcc-e292dbb06b68cd9f03055dff06de8989715ac2b8.tar.gz gcc-e292dbb06b68cd9f03055dff06de8989715ac2b8.tar.bz2 |
stmt.c (expand_nl_goto_receiver): Copy hard register clobbers and ASM_INPUT barrier from...
* stmt.c (expand_nl_goto_receiver): Copy hard register clobbers
and ASM_INPUT barrier from expand_builtin_setjmp_receiver.
* gcc.c-torture/execute/nestfunc-5.c: New.
From-SVN: r74326
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -3558,6 +3558,14 @@ expand_nl_handler_label (rtx slot, rtx before_insn) static void expand_nl_goto_receiver (void) { + /* Clobber the FP when we get here, so we have to make sure it's + marked as used by this function. */ + emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx)); + + /* Mark the static chain as clobbered here so life information + doesn't get messed up for it. */ + emit_insn (gen_rtx_CLOBBER (VOIDmode, static_chain_rtx)); + #ifdef HAVE_nonlocal_goto if (! HAVE_nonlocal_goto) #endif @@ -3606,6 +3614,13 @@ expand_nl_goto_receiver (void) if (HAVE_nonlocal_goto_receiver) emit_insn (gen_nonlocal_goto_receiver ()); #endif + + /* @@@ This is a kludge. Not all machine descriptions define a blockage + insn, but we must not allow the code we just generated to be reordered + by scheduling. Specifically, the update of the frame pointer must + happen immediately, not later. So emit an ASM_INPUT to act as blockage + insn. */ + emit_insn (gen_rtx_ASM_INPUT (VOIDmode, "")); } /* Make handlers for nonlocal gotos taking place in the function calls in |