* flow.c (mark_used_reg): Hack around rs6000 eliminable pic reg.
authorRichard Henderson <rth@cygnus.com>
Sat, 22 Apr 2000 18:47:52 +0000 (11:47 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 22 Apr 2000 18:47:52 +0000 (11:47 -0700)
From-SVN: r33342

gcc/ChangeLog
gcc/flow.c

index 2fcc64a8aad3e80d22b958d85722e40339d25bf2..7b3844a862e44c870b5e14ff5b39eeb3fabff0c7 100644 (file)
@@ -1,3 +1,7 @@
+2000-04-22  Richard Henderson  <rth@cygnus.com>
+
+       * flow.c (mark_used_reg): Hack around rs6000 eliminable pic reg.
+
 2000-04-22  Richard Henderson  <rth@cygnus.com>
 
        * diagnostic.c (init_output_buffer): Don't initialize format_args.
index 9f7537e3aeab6a367845d82649c0851f73a9ff93..24ae92c9b05aaa91ffd5ad972b1ce69f43c939d3 100644 (file)
@@ -4473,12 +4473,15 @@ mark_used_reg (pbi, reg, cond, insn)
             be eliminated, reload will set it live at that point.
 
             Otherwise, record that this function uses this register.  */
+         /* ??? The PPC backend tries to "eliminate" on the pic
+            register to itself.  This should be fixed.  In the mean
+            time, hack around it.  */
 
-         if (! TEST_HARD_REG_BIT (elim_reg_set, regno))
+         if (! (TEST_HARD_REG_BIT (elim_reg_set, regno)
+                && (regno == FRAME_POINTER_REGNUM
+                    || regno == ARG_POINTER_REGNUM)))
            {
              int n = HARD_REGNO_NREGS (regno, GET_MODE (reg));
-             if (n == 0)
-               n = 1;
              do
                regs_ever_live[regno + --n] = 1;
              while (n > 0);