OSDN Git Service

* config/mips/mips.c (mips_global_pointer): Don't try to use $25.
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Oct 2003 18:07:38 +0000 (18:07 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Oct 2003 18:07:38 +0000 (18:07 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73094 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 6b6a161..99f3442 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 73873bf..46b27f2 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;