From: aph Date: Tue, 6 Mar 2007 17:21:37 +0000 (+0000) Subject: 2007-03-06 Andrew Haley X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=1b7fd1d90f9ed8ed108ecac8c2cf12a80c3f9728 2007-03-06 Andrew Haley * function.c (expand_function_end): Move blockage to just after we emit the label for the naked return from the function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122626 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6067d3edbc..0e6de0b30bc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-03-06 Andrew Haley + + * function.c (expand_function_end): Move blockage to just after we + emit the label for the naked return from the function. + 2007-03-06 Richard Sandiford * config/i386/att.h (ASM_OUTPUT_ASCII, ASM_OUTPUT_SKIP): Undefine diff --git a/gcc/function.c b/gcc/function.c index 1d48f5b33a2..f6ebb855898 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 ();