This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch committed] Fix sh_set_return_address
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 May 2009 07:19:55 +0900 (JST)
- Subject: [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. */