[patch committed] Fix sh_set_return_address

Kaz Kojima kkojima@rr.iij4u.or.jp
Sun May 24 22:20:00 GMT 2009


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.  */



More information about the Gcc-patches mailing list