aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2002-01-05 16:52:31 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2002-01-05 11:52:31 -0500
commit0134bf2d500a6b9af1a4f9e0fc582c00fc43edf4 (patch)
tree131996aa50fc0d657567aee2f7cb3cea0cccd4bd
parent9ca88d5a79485825234cc12ca6e2af02b18b9503 (diff)
downloadgcc-0134bf2d500a6b9af1a4f9e0fc582c00fc43edf4.zip
gcc-0134bf2d500a6b9af1a4f9e0fc582c00fc43edf4.tar.gz
gcc-0134bf2d500a6b9af1a4f9e0fc582c00fc43edf4.tar.bz2
rs6000.h (TARGET_POWERPC): For IN_LIBGCC2, define as 1 for __powerpc64__ as well.
* 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. From-SVN: r48567
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/alias.c36
-rw-r--r--gcc/config/rs6000/rs6000.h2
-rw-r--r--gcc/config/rs6000/t-aix4310
4 files changed, 45 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 35cb8e9..8a1a383 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/alias.c b/gcc/alias.c
index b39be73..9843d06 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -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;
}
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index e710578..0ed3b2b 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -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
diff --git a/gcc/config/rs6000/t-aix43 b/gcc/config/rs6000/t-aix43
index 1327bca..209a763 100644
--- a/gcc/config/rs6000/t-aix43
+++ b/gcc/config/rs6000/t-aix43
@@ -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