This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Don't use $25 as the mips gp
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 30 Oct 2003 18:18:18 +0000
- Subject: [committed] Don't use $25 as the mips gp
Got a bootstrap failure while experimenting with some mips changes.
It turned out that we were trying to use $25 as the global pointer.
Bootstrapped & regression tested on mips64{,el}-linux-gnu, installed
as obvious.
Richard
* config/mips/mips.c (mips_global_pointer): Don't try to use $25.
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.337
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.337 mips.c
--- config/mips/mips.c 30 Oct 2003 02:02:43 -0000 1.337
+++ config/mips/mips.c 30 Oct 2003 18:01:56 -0000
@@ -6043,7 +6043,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;