OSDN Git Service

* config/rs6000/rs6000.h (TARGET_POWERPC): For IN_LIBGCC2, define
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 Jan 2002 16:52:31 +0000 (16:52 +0000)
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 5 Jan 2002 16:52:31 +0000 (16:52 +0000)
        as 1 for __powerpc64__ as well.

        * config/rs6000/t-aix43 (T_ADAFLAGS): Define.

        * alias.c (find_base_value, PLUS/MINUS): If we found a base,
        return it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48567 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/alias.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/t-aix43

index 35cb8e9..8a1a383 100644 (file)
@@ -1,3 +1,13 @@
+2002-01-05  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.h (TARGET_POWERPC): For IN_LIBGCC2, define
+       as 1 for __powerpc64__ as well.
+
+       * config/rs6000/t-aix43 (T_ADAFLAGS): Define.
+
+       * alias.c (find_base_value, PLUS/MINUS): If we found a base,
+       return it.
+
 2002-01-05  Daniel Berlin  <dan@dberlin.org>
 
        * lcm.c: Revert change, due to performance regression it causes on
index b39be73..9843d06 100644 (file)
@@ -779,22 +779,46 @@ find_base_value (src)
       {
        rtx temp, src_0 = XEXP (src, 0), src_1 = XEXP (src, 1);
 
+       /* If either operand is a REG that is a known pointer, then it
+          is the base.  */
+       if (REG_P (src_0) && REG_POINTER (src_0))
+         return find_base_value (src_0);
+       if (REG_P (src_1) && REG_POINTER (src_1))
+         return find_base_value (src_1);
+
        /* If either operand is a REG, then see if we already have
           a known value for it.  */
-       if (GET_CODE (src_0) == REG)
+       if (REG_P (src_0))
          {
            temp = find_base_value (src_0);
            if (temp != 0)
              src_0 = temp;
          }
 
-       if (GET_CODE (src_1) == REG)
+       if (REG_P (src_1))
          {
            temp = find_base_value (src_1);
            if (temp!= 0)
              src_1 = temp;
          }
 
+       /* If either base is named object or a special address
+          (like an argument or stack reference), then use it for the
+          base term.  */
+       if (src_0 != 0
+           && (GET_CODE (src_0) == SYMBOL_REF
+               || GET_CODE (src_0) == LABEL_REF
+               || (GET_CODE (src_0) == ADDRESS
+                   && GET_MODE (src_0) != VOIDmode)))
+         return src_0;
+
+       if (src_1 != 0
+           && (GET_CODE (src_1) == SYMBOL_REF
+               || GET_CODE (src_1) == LABEL_REF
+               || (GET_CODE (src_1) == ADDRESS
+                   && GET_MODE (src_1) != VOIDmode)))
+         return src_1;
+
        /* Guess which operand is the base address:
           If either operand is a symbol, then it is the base.  If
           either operand is a CONST_INT, then the other is the base.  */
@@ -803,14 +827,6 @@ find_base_value (src)
        else if (GET_CODE (src_0) == CONST_INT || CONSTANT_P (src_1))
          return find_base_value (src_1);
 
-       /* This might not be necessary anymore:
-          If either operand is a REG that is a known pointer, then it
-          is the base.  */
-       else if (GET_CODE (src_0) == REG && REG_POINTER (src_0))
-         return find_base_value (src_0);
-       else if (GET_CODE (src_1) == REG && REG_POINTER (src_1))
-         return find_base_value (src_1);
-
        return 0;
       }
 
index e710578..0ed3b2b 100644 (file)
@@ -253,7 +253,7 @@ extern int target_flags;
 
 #ifdef IN_LIBGCC2
 /* For libgcc2 we make sure this is a compile time constant */
-#ifdef __64BIT__
+#if defined (__64BIT__) || defined (__powerpc64__)
 #define TARGET_POWERPC64       1
 #else
 #define TARGET_POWERPC64       0
index 1327bca..209a763 100644 (file)
@@ -64,5 +64,11 @@ SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
 SHLIB_NM_FLAGS = -Bpg
 
-# Both 32-bit and 64-bit objects in archives
-AR_FLAGS_FOR_TARGET=-X32_64
+# Either 32-bit and 64-bit objects in archives.
+AR_FLAGS_FOR_TARGET = -X32_64
+
+# Compile Ada files with minimal-toc.  The primary focus is gnatlib, so
+# that the library does not use nearly the entire TOC of applications
+# until gnatlib is built as a shared library on AIX.  Compiling the
+# compiler with -mminimal-toc does not cause any harm.
+T_ADAFLAGS = -mminimal-toc