From: Richard Kenner Date: Sat, 26 Jun 1993 21:08:49 +0000 (-0400) Subject: (reload): Use reg_equiv_address for invalid addresses X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6491dbbb8121b9afa1400b9c1143b9eb32b4da65;p=gcc.git (reload): Use reg_equiv_address for invalid addresses of the form (mem (reg)). From-SVN: r4761 --- diff --git a/gcc/reload1.c b/gcc/reload1.c index 11bf8f42463..b08a38322fa 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))