From: Andrew Haley Date: Wed, 10 Mar 2004 17:42:21 +0000 (+0000) Subject: re PR rtl-optimization/14381 (sched2 moving "may throw" instructions into epilogue) X-Git-Tag: releases/gcc-3.3.4~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97656339b85d6e20fe419f04c0e4b862ebc71167;p=thirdparty%2Fgcc.git re PR rtl-optimization/14381 (sched2 moving "may throw" instructions into epilogue) 2004-03-10 Andrew Haley PR optimization/14381 * function.c (expand_function_end): Emit a blockage insn before the epilogue when -fnon-call-exceptions is used. From-SVN: r79264 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 30a832513ec7..380113713592 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-03-10 Andrew Haley + + PR optimization/14381 + * function.c (expand_function_end): Emit a blockage insn before + the epilogue when -fnon-call-exceptions is used. + 2004-03-10 Joel Sherrill PR target/14480 diff --git a/gcc/function.c b/gcc/function.c index eedd909c4363..cbfec0c93718 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -6961,6 +6961,14 @@ expand_function_end (filename, line, end_bindings) clear_pending_stack_adjust (); do_pending_stack_adjust (); + /* ??? 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, "")); + /* Mark the end of the function body. If control reaches this insn, the function can drop through without returning a value. */