* config/mips/mips.c (mips_global_pointer): Don't try to use $25.
authorRichard Sandiford <rsandifo@redhat.com>
Thu, 30 Oct 2003 18:07:38 +0000 (18:07 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 30 Oct 2003 18:07:38 +0000 (18:07 +0000)
From-SVN: r73094

gcc/ChangeLog
gcc/config/mips/mips.c

index 6b6a1618b636920f7bd4443bb5e42be924ff15d1..99f3442fe273504791e298472f8ad435b5e72e07 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-30  Richard Sandiford  <rsandifo@redhat.com>
+
+       * config/mips/mips.c (mips_global_pointer): Don't try to use $25.
+
 2003-10-30  Richard Henderson  <rth@redhat.com>
 
        * config/mips/mips.c (mips_build_builtin_va_list): Use runtime
index 73873bf15b2d9049a4b9541e5148f877878d2152..46b27f2c35659120cdf2f4d9731f110596afdde4 100644 (file)
@@ -6039,7 +6039,8 @@ mips_global_pointer (void)
     for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++)
       if (!regs_ever_live[regno]
          && call_used_regs[regno]
-         && !fixed_regs[regno])
+         && !fixed_regs[regno]
+         && regno != PIC_FUNCTION_ADDR_REGNUM)
        return regno;
 
   return GLOBAL_POINTER_REGNUM;