This is the mail archive of the gcc-patches@gcc.gnu.org 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 committed] Fix sh_set_return_address


Hi,

Almost eh tests fail for sh64 on 4.4 and 4.5 for a while.
The attached patch is to fix it.  The problem was that the store
of eh return address was optimized out with DSE.  The patch is
tested with bootstrap and the top level "make -k check" on
sh4-unknown-linux-gnu.  Applied on trunk and 4.4 branch.

Regards,
	kaz
--
2009-05-24  Kaz Kojima  <kkojima@gcc.gnu.org>

	* gcc/config/sh/sh.c (sh_set_return_address): Mark store of
	return address with a USE.

--- ORIG/trunk/gcc/config/sh/sh.c	2009-05-19 10:49:14.000000000 +0900
+++ trunk/gcc/config/sh/sh.c	2009-05-23 08:05:55.000000000 +0900
@@ -7055,6 +7055,8 @@ sh_set_return_address (rtx ra, rtx tmp)
 
   tmp = gen_frame_mem (Pmode, tmp);
   emit_insn (GEN_MOV (tmp, ra));
+  /* Tell this store isn't dead.  */
+  emit_use (tmp);
 }
 
 /* Clear variables at function end.  */


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