OSDN Git Service

PR target/39523
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Mar 2009 22:23:27 +0000 (22:23 +0000)
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Mar 2009 22:23:27 +0000 (22:23 +0000)
* config/sh/sh.c (calc_live_regs): Fix condition for global
registers except PIC_OFFSET_TABLE_REGNUM.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145077 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/sh/sh.c

index 1b7d902..7d9fe81 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2009-03-25  Kai Tietz  <kai.tietz@onevision.com>
 
        PR/39518
index 3c57730..c8f4c85 100644 (file)
@@ -5966,7 +5966,9 @@ calc_live_regs (HARD_REG_SET *live_regs_mask)
              && 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)