diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-10-01 15:29:09 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-10-01 15:29:09 -0700 |
commit | a7fd196c670dde3de2867483b0bb5eec17b7eeda (patch) | |
tree | c9b026b338bbeafa60a5047be2c601c607188a2a | |
parent | d9771f62959b956e116a8bba90fcc82f853aa1e4 (diff) | |
download | gcc-a7fd196c670dde3de2867483b0bb5eec17b7eeda.zip gcc-a7fd196c670dde3de2867483b0bb5eec17b7eeda.tar.gz gcc-a7fd196c670dde3de2867483b0bb5eec17b7eeda.tar.bz2 |
(gen_input_reload): Handle PLUS with MEM operand
exactly the same as a PLUS with a REG operand.
From-SVN: r5549
-rw-r--r-- | gcc/reload1.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c index c9992a8..72ec234 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -6404,11 +6404,11 @@ gen_input_reload (reloadreg, in, opnum, type) register that didn't get a hard register. In that case we can just call emit_move_insn. - We can also be asked to reload a PLUS that adds either two registers, or - a register and a constant or MEM, or a MEM and a constant. This can - occur during frame pointer elimination and while reloading addresses. - This case is handled by trying to emit a single insn - to perform the add. If it is not valid, we use a two insn sequence. + We can also be asked to reload a PLUS that adds a register or a MEM to + another register, constant or MEM. This can occur during frame pointer + elimination and while reloading addresses. This case is handled by + trying to emit a single insn to perform the add. If it is not valid, + we use a two insn sequence. Finally, we could be called to handle an 'o' constraint by putting an address into a register. In that case, we first try to do this @@ -6426,16 +6426,14 @@ gen_input_reload (reloadreg, in, opnum, type) ??? At some point, this whole thing needs to be rethought. */ if (GET_CODE (in) == PLUS - && ((GET_CODE (XEXP (in, 0)) == REG - && (GET_CODE (XEXP (in, 1)) == REG - || CONSTANT_P (XEXP (in, 1)) - || GET_CODE (XEXP (in, 1)) == MEM)) - || (GET_CODE (XEXP (in, 0)) == MEM - && CONSTANT_P (XEXP (in, 1))))) + && (GET_CODE (XEXP (in, 0)) == REG + || GET_CODE (XEXP (in, 0)) == MEM) + && (GET_CODE (XEXP (in, 1)) == REG + || CONSTANT_P (XEXP (in, 1)) + || GET_CODE (XEXP (in, 1)) == MEM)) { - /* We need to compute the sum of what is either a register and a - constant, a register and memory, a hard register and a pseudo - register, or memory and a constant and put it into the reload + /* We need to compute the sum of a register or a MEM and another + register, constant, or MEM, and put it into the reload register. The best possible way of doing this is if the machine has a three-operand ADD insn that accepts the required operands. |