aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-06-26 17:08:49 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-06-26 17:08:49 -0400
commit6491dbbb8121b9afa1400b9c1143b9eb32b4da65 (patch)
tree30c661756c1e8a39f3ca5cc97b9e1462b8efa727
parent73ebbfdff0d75988af114269be5afe76f6709ab8 (diff)
downloadgcc-6491dbbb8121b9afa1400b9c1143b9eb32b4da65.zip
gcc-6491dbbb8121b9afa1400b9c1143b9eb32b4da65.tar.gz
gcc-6491dbbb8121b9afa1400b9c1143b9eb32b4da65.tar.bz2
(reload): Use reg_equiv_address for invalid addresses
of the form (mem (reg)). From-SVN: r4761
-rw-r--r--gcc/reload1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 11bf8f4..b08a383 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -819,7 +819,8 @@ reload (first, global, dumpfile)
and constant, it is probably not addressable because the constant is
out of range, in that case record the address; we will generate
hairy code to compute the address in a register each time it is
- needed.
+ needed. Similarly if it is a hard register, but one that is not
+ valid as an address register.
If the location is not addressable, but does not have one of the
above forms, assign a stack slot. We have to do this to avoid the
@@ -839,6 +840,8 @@ reload (first, global, dumpfile)
XEXP (x, 0)))
reg_equiv_mem[i] = x, reg_equiv_address[i] = 0;
else if (CONSTANT_P (XEXP (x, 0))
+ || (GET_CODE (XEXP (x, 0)) == REG
+ && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER)
|| (GET_CODE (XEXP (x, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == REG
&& (REGNO (XEXP (XEXP (x, 0), 0))