]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/14381 (sched2 moving "may throw" instructions into epilogue)
authorAndrew Haley <aph@redhat.com>
Wed, 10 Mar 2004 17:42:21 +0000 (17:42 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Wed, 10 Mar 2004 17:42:21 +0000 (17:42 +0000)
2004-03-10  Andrew Haley  <aph@redhat.com>

        PR optimization/14381
        * function.c (expand_function_end): Emit a blockage insn before
        the epilogue when -fnon-call-exceptions is used.

From-SVN: r79264

gcc/ChangeLog
gcc/function.c

index 30a832513ec7b99e4fee793c4b45a5fe613fdb9d..380113713592c554446225b6117d98749346fa21 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-10  Andrew Haley  <aph@redhat.com>
+
+       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  <joel@oarcorp.com>
 
        PR target/14480
index eedd909c43630ffed660653f0a2140f2e6c891f8..cbfec0c937183bc24fe05f550267a760e65f5688 100644 (file)
@@ -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.  */