diff options
author | David Edelsohn <edelsohn@gnu.org> | 2002-01-05 16:52:31 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2002-01-05 11:52:31 -0500 |
commit | 0134bf2d500a6b9af1a4f9e0fc582c00fc43edf4 (patch) | |
tree | 131996aa50fc0d657567aee2f7cb3cea0cccd4bd /gcc/alias.c | |
parent | 9ca88d5a79485825234cc12ca6e2af02b18b9503 (diff) | |
download | gcc-0134bf2d500a6b9af1a4f9e0fc582c00fc43edf4.tar.gz |
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
Diffstat (limited to 'gcc/alias.c')
-rw-r--r-- | gcc/alias.c | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index b39be731173..9843d0605b5 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; } |