This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch committed] Fix PR target/39523
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 26 Mar 2009 07:24:13 +0900 (JST)
- Subject: [patch committed] Fix PR target/39523
Hi,
I've committed the attached patch for PR target/39523
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39523
which is a 4.4 regression on SH. The recent change
in the revision 144964 reveals that sh.c:calc_live_regs
should take the global registers into account.
The patch is tested with bootstrap and the top level
"make -k check" on sh4-unknown-linux-gnu with no new
failures.
Regards,
kaz
--
2009-03-25 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/39523
* config/sh/sh.c (calc_live_regs): Fix condition for global
registers except PIC_OFFSET_TABLE_REGNUM.
diff -up ORIG/trunk/gcc/config/sh/sh.c trunk/gcc/config/sh/sh.c
--- ORIG/trunk/gcc/config/sh/sh.c 2008-10-31 19:18:54.000000000 +0900
+++ trunk/gcc/config/sh/sh.c 2009-03-22 06:45:12.000000000 +0900
@@ -5966,7 +5966,9 @@ calc_live_regs (HARD_REG_SET *live_regs_
&& crtl->args.info.call_cookie
&& reg == PIC_OFFSET_TABLE_REGNUM)
|| (df_regs_ever_live_p (reg)
- && (!call_really_used_regs[reg]
+ && ((!call_really_used_regs[reg]
+ && !(reg != PIC_OFFSET_TABLE_REGNUM
+ && fixed_regs[reg] && call_used_regs[reg]))
|| (trapa_handler && reg == FPSCR_REG && TARGET_FPU_ANY)))
|| (crtl->calls_eh_return
&& (reg == EH_RETURN_DATA_REGNO (0)