re PR target/18032 ([4.0.0] SH: wrong code for EH)
authorKaz Kojima <kkojima@gcc.gnu.org>
Wed, 20 Oct 2004 13:57:22 +0000 (13:57 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Wed, 20 Oct 2004 13:57:22 +0000 (13:57 +0000)
PR target/18032
* config/sh/sh.c (sh_expand_epilogue): Emit a blockage insn before
the frame pointer adjustment when exception handling is enabled.

From-SVN: r89333

gcc/ChangeLog
gcc/config/sh/sh.c

index f6266ac82f1d130fa368f1da14ab4fed40e8d38d..5a5d71992fc4d0bb817a3866724e0c12a82e7054 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-20  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR target/18032
+       * config/sh/sh.c (sh_expand_epilogue): Emit a blockage insn before
+       the frame pointer adjustment when exception handling is enabled.
+
 2004-10-20  Kazu Hirata  <kazu@cs.umass.edu>
 
        * stor-layout.c: Fix a comment typo.
index d489a858f573566647ab3454e192609fc0f8c9d7..83a938eb7faedb7897c2a41fa07d6bbe5dc24b02 100644 (file)
@@ -5828,6 +5828,10 @@ sh_expand_epilogue (bool sibcall_p)
 
   if (frame_pointer_needed)
     {
+      /* We must avoid scheduling the epilogue with previous basic blocks
+        when exception handling is enabled.  See PR/18032.  */
+      if (flag_exceptions)
+       emit_insn (gen_blockage ());
       output_stack_adjust (frame_size, frame_pointer_rtx, e, &live_regs_mask);
 
       /* We must avoid moving the stack pointer adjustment past code