This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/RFA] PR target/18032: SH: wrong code for EH


The appended patch suggested by Joern is to fix PR target/18032:

It bootstraps and there are no new regressions on mainline for
sh4-unknown-linux-gnu.  OK for mainline?  Can I backport it for

2004-10-20  Kaz Kojima  <>

	PR target/18032
	* config/sh/sh.c (sh_expand_epilogue): Emit a blockage insn before
	the frame pointer adjustment when exception handling is enabled.

--- ORIG/gcc/gcc/config/sh/sh.c	2004-10-08 07:46:30.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.c	2004-10-19 07:20:50.000000000 +0900
@@ -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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]