This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]