]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ia64.c: Revert 10-23 patch.
authorRichard Henderson <rth@redhat.com>
Fri, 27 Oct 2000 21:27:10 +0000 (14:27 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 27 Oct 2000 21:27:10 +0000 (14:27 -0700)
        * config/ia64/ia64.c: Revert 10-23 patch.
        (ia64_hard_regno_rename_ok): New.
        * config/ia64/ia64-protos.h: Declare it.
        * config/ia64/ia64.h (HARD_REGNO_RENAME_OK): Use it.

From-SVN: r37090

gcc/ChangeLog
gcc/config/ia64/ia64-protos.h
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.h

index fbb52e6772febbf45381273e548f6f5758704d0e..39e1ff39ac8c43ae53411f1dc4477ca1c3677d02 100644 (file)
@@ -1,3 +1,10 @@
+2000-10-27  Richard Henderson  <rth@redhat.com>
+
+       * config/ia64/ia64.c: Revert 10-23 patch.
+       (ia64_hard_regno_rename_ok): New.
+       * config/ia64/ia64-protos.h: Declare it.
+       * config/ia64/ia64.h (HARD_REGNO_RENAME_OK): Use it.
+
 2000-10-27  Bernd Schmidt  <bernds@redhat.co.uk>
            Richard Henderson  <rth@redhat.com>
 
index 839648cdf2cf72e2854a4f68b3ad2dcee3a31d3f..fc1dff1091f8e7b2308a657f16ec1b6f0a786652 100644 (file)
@@ -82,6 +82,7 @@ extern void ia64_function_epilogue PARAMS((FILE *, int));
 
 extern int ia64_direct_return PARAMS((void));
 extern void ia64_expand_load_address PARAMS((rtx, rtx));
+extern int ia64_hard_regno_rename_ok PARAMS((int, int));
 
 extern void ia64_initialize_trampoline PARAMS((rtx, rtx, rtx));
 extern void ia64_print_operand_address PARAMS((FILE *, rtx));
index dcf3ce17ff7bad375938cc796eb209704ffb171d..6790d3f3ab4bb00bfbf3c76472c72b1f07a3f921 100644 (file)
@@ -1852,12 +1852,6 @@ ia64_expand_prologue ()
        reg_names[OUT_REG (i)] = ia64_reg_numbers[inputs + locals + i];
     }
 
-  /* ??? Temporarily mark the remaining output registers fixed, so
-     that the register renaming pass does not try to used them after
-     we've fixed the size of the register frame.  */
-  for (i = current_frame_info.n_output_regs; i < 8; ++i)
-    fixed_regs[OUT_REG (i)] = 1;
-
   /* Set the frame pointer register name.  The regnum is logically loc79,
      but of course we'll not have allocated that many locals.  Rather than
      worrying about renumbering the existing rtxs, we adjust the name.  */
@@ -2393,6 +2387,31 @@ ia64_direct_return ()
   return 0;
 }
 
+int
+ia64_hard_regno_rename_ok (from, to)
+     int from;
+     int to;
+{
+  /* Don't clobber any of the registers we reserved for the prologue.  */
+  if (to == current_frame_info.reg_fp
+      || to == current_frame_info.reg_save_b0
+      || to == current_frame_info.reg_save_pr
+      || to == current_frame_info.reg_save_ar_pfs
+      || to == current_frame_info.reg_save_ar_unat
+      || to == current_frame_info.reg_save_ar_lc)
+    return 0;
+
+  /* Don't use output registers outside the register frame.  */
+  if (OUT_REGNO_P (to) && to >= OUT_REG (current_frame_info.n_output_regs))
+    return 0;
+
+  /* Retain even/oddness on predicate register pairs.  */
+  if (PR_REGNO_P (from) && PR_REGNO_P (to))
+    return (from & 1) == (to & 1);
+
+  return 1;
+}
+
 /* Emit the function prologue.  */
 
 void
@@ -2503,9 +2522,6 @@ ia64_function_epilogue (file, size)
        reg_names[OUT_REG (i)] = ia64_output_reg_names[i];
     }
 
-  for (i = 0; i < 8; ++i)
-    fixed_regs[OUT_REG (i)] = 0;
-
   current_frame_info.initialized = 0;
 }
 
index 9fd78f8317bedfaf473b6f785a6dcd3339d13008..7802e3905507dacb49bca8df67343ac9d2c45fdf 100644 (file)
@@ -2643,11 +2643,7 @@ do {                                                                     \
    considered for use as a rename register for REGNO1 */
 
 #define HARD_REGNO_RENAME_OK(REGNO1,REGNO2) \
-  ((! PR_REGNO_P (REGNO1) && ! PR_REGNO_P (REGNO2))                    \
-    ? (!call_fixed_regs [REGNO1] && !call_fixed_regs [REGNO2])         \
-      ? 1 : 0                                                          \
-    : ((REGNO2) > 256 && ((REGNO2 & 1) == 0))                          \
-      ? 1 : 0)
+  ia64_hard_regno_rename_ok((REGNO1), (REGNO2))
 
 /* Define this macro if the compiler should use extended basic blocks
    when renaming registers.  Define this macro if the target has predicate