* sh.c (calc_live_regs, sh_pr_n_sets): Use of PR_MEDIA_REG / PR_REG
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Apr 2002 12:14:33 +0000 (12:14 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Apr 2002 12:14:33 +0000 (12:14 +0000)
depends on TARGET_SHMEDIA, not TARGET_SH5.

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

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

index f773679..3200abb 100644 (file)
@@ -1,3 +1,8 @@
+Fri Apr 12 12:11:26 2002  J"orn Rennecke <joern.rennecke@superh.com>
+
+       * sh.c (calc_live_regs, sh_pr_n_sets): Use of PR_MEDIA_REG / PR_REG
+       depends on TARGET_SHMEDIA, not TARGET_SH5.
+
 2002-04-12  Hans-Peter Nilsson  <hp@bitrange.com>
 
        * function.c (fixup_var_refs_1) <SET, handling VAR in SET_SRC>:
index 815d8dc..d80801b 100644 (file)
@@ -4351,10 +4351,11 @@ calc_live_regs (count_ptr, live_regs_mask)
          break;
        }
   pr_initial = has_hard_reg_initial_val (Pmode,
-                                        TARGET_SH5 ? PR_MEDIA_REG : PR_REG);
+                                        TARGET_SHMEDIA
+                                        ? PR_MEDIA_REG : PR_REG);
   pr_live = (pr_initial
-            ? REGNO (pr_initial) != (TARGET_SH5 ? PR_MEDIA_REG : PR_REG)
-            : regs_ever_live[TARGET_SH5 ? PR_MEDIA_REG : PR_REG]);
+            ? REGNO (pr_initial) != (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG)
+            : regs_ever_live[TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG]);
   /* Force PR to be live if the prologue has to call the SHmedia
      argument decoder or register saver.  */
   if (TARGET_SHCOMPACT
@@ -4364,7 +4365,7 @@ calc_live_regs (count_ptr, live_regs_mask)
     pr_live = 1;
   for (count = 0, reg = FIRST_PSEUDO_REGISTER - 1; reg >= 0; reg--)
     {
-      if (reg == (TARGET_SH5 ? PR_MEDIA_REG : PR_REG)
+      if (reg == (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG)
          ? pr_live
          : (interrupt_handler && ! pragma_trapa)
          ? (/* Need to save all the regs ever live.  */
@@ -6705,7 +6706,7 @@ sh_adjust_cost (insn, link, dep_insn, cost)
 int
 sh_pr_n_sets ()
 {
-  return REG_N_SETS (TARGET_SH5 ? PR_MEDIA_REG : PR_REG);
+  return REG_N_SETS (TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG);
 }
 
 /* SHmedia requires registers for branches, so we can't generate new