diff options
author | Andrew Haley <aph@redhat.com> | 2007-03-06 17:21:37 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2007-03-06 17:21:37 +0000 |
commit | 251086461ec7455a8075294efa209468026600f7 (patch) | |
tree | 1ae3a1208716abeed41b0b25c76b336211c53fd9 /gcc/function.c | |
parent | af17c030e8e667f46e4170decf58b744437a4315 (diff) | |
download | gcc-251086461ec7455a8075294efa209468026600f7.zip gcc-251086461ec7455a8075294efa209468026600f7.tar.gz gcc-251086461ec7455a8075294efa209468026600f7.tar.bz2 |
function.c (expand_function_end): Move blockage to just after we emit the label for the naked return from the...
2007-03-06 Andrew Haley <aph@redhat.com>
* function.c (expand_function_end): Move blockage to just after we
emit the label for the naked return from the function.
From-SVN: r122626
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/function.c b/gcc/function.c index 1d48f5b..f6ebb85 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4327,16 +4327,6 @@ expand_function_end (void) if (flag_exceptions) sjlj_emit_function_exit_after (get_last_insn ()); } - else - { - /* @@@ This is a kludge. We want to ensure that instructions that - may trap are not moved into the epilogue by scheduling, because - we don't always emit unwind information for the epilogue. - However, not all machine descriptions define a blockage insn, so - emit an ASM_INPUT to act as one. */ - if (flag_non_call_exceptions) - emit_insn (gen_rtx_ASM_INPUT (VOIDmode, "")); - } /* If this is an implementation of throw, do what's necessary to communicate between __builtin_eh_return and the epilogue. */ @@ -4478,6 +4468,14 @@ expand_function_end (void) /* Output the label for the naked return from the function. */ emit_label (naked_return_label); + /* @@@ This is a kludge. We want to ensure that instructions that + may trap are not moved into the epilogue by scheduling, because + we don't always emit unwind information for the epilogue. + However, not all machine descriptions define a blockage insn, so + emit an ASM_INPUT to act as one. */ + if (! USING_SJLJ_EXCEPTIONS && flag_non_call_exceptions) + emit_insn (gen_rtx_ASM_INPUT (VOIDmode, "")); + /* If stack protection is enabled for this function, check the guard. */ if (cfun->stack_protect_guard) stack_protect_epilogue (); |