]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000.h (FIXED_REGISTERS): Use FIXED_R2.
authorDale Johannesen <dalej@apple.com>
Mon, 17 Sep 2001 23:24:52 +0000 (23:24 +0000)
committerStan Shebs <shebs@gcc.gnu.org>
Mon, 17 Sep 2001 23:24:52 +0000 (23:24 +0000)
2001-09-17  Dale Johannesen  <dalej@apple.com>

        * config/rs6000/rs6000.h (FIXED_REGISTERS): Use FIXED_R2.
        * config/rs6000/aix.h (FIXED_R2): Define.
        * config/rs6000/darwin.h (FIXED_R2): Define.
        * config/rs6000/sysv4.h (FIXED_R2): Define.

From-SVN: r45669

gcc/ChangeLog
gcc/config/rs6000/aix.h
gcc/config/rs6000/darwin.h
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/sysv4.h

index 6a069f1a9681f5a4b688e26eda836ffe4cb2b0aa..ae11d42cae57da2f2117de8bec1308f67b89c5aa 100644 (file)
@@ -1,3 +1,10 @@
+2001-09-17  Dale Johannesen  <dalej@apple.com>
+
+       * config/rs6000/rs6000.h (FIXED_REGISTERS): Use FIXED_R2.
+       * config/rs6000/aix.h (FIXED_R2): Define.
+       * config/rs6000/darwin.h (FIXED_R2): Define.
+       * config/rs6000/sysv4.h (FIXED_R2): Define.
+
 2001-09-17  Jeff Sturm  <jsturm@one-point.com>
 
        * except.c (dw2_build_landing_pads): New local
index 428ab43ea32a0eb6fa46beb9e02f651dd1da6d6c..28bf98aab13aefca0f9f653fa1693aa3105b0811 100644 (file)
@@ -161,6 +161,7 @@ Boston, MA 02111-1307, USA.  */
 #define TARGET_NO_TOC          0
 #define        TARGET_TOC              1
 
+#define FIXED_R2 1
 /* AIX allows r13 to be used.  */
 #define FIXED_R13 0
 
index 6e6a04f480e92982bfb4fe450593c8589cba2be8..32bdfba871fa2ad6a63551e1d8a3bc370b4ffc80 100644 (file)
@@ -39,6 +39,8 @@ Boston, MA 02111-1307, USA.  */
 
 #define CC1_SPEC "%{!static:-fPIC}"
 
+/* Make both r2 and r3 available for allocation.  */
+#define FIXED_R2 0
 #define FIXED_R13 0
 
 #undef  TARGET_DEFAULT
index b602dfb8526235e9b4850145154e9613c00cba78..a1103a7b01fff38c45a43d24d45cd367e4e9c341 100644 (file)
@@ -641,14 +641,15 @@ extern int rs6000_debug_arg;              /* debug argument handling */
 /* 1 for registers that have pervasive standard uses
    and are not available for the register allocator.
 
-   On RS/6000, r1 is used for the stack and r2 is used as the TOC pointer.
+   On RS/6000, r1 is used for the stack.  On Darwin, r2 is available
+   as a local register; for all other OS's r2 is the TOC pointer.
 
    cr5 is not supposed to be used.
 
    On System V implementations, r13 is fixed and not available for use.  */
 
 #define FIXED_REGISTERS  \
-  {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FIXED_R13, 0, 0, \
+  {0, 1, FIXED_R2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, FIXED_R13, 0, 0, \
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
index 38fcb83458b520ffa908c4f30a5e4176016f7e16..554090cc080341302d42a53c30a2a9f606d993d3 100644 (file)
@@ -314,9 +314,9 @@ do {                                                                        \
 #undef PROCESSOR_DEFAULT
 #define        PROCESSOR_DEFAULT PROCESSOR_PPC750
 
+#define FIXED_R2 1
 /* System V.4 uses register 13 as a pointer to the small data area,
    so it is not available to the normal user.  */
-
 #define FIXED_R13 1
 
 /* Size of the V.4 varargs area if needed.  */