diff options
author | Richard Stallman <rms@gnu.org> | 1993-11-03 21:16:16 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1993-11-03 21:16:16 +0000 |
commit | 3a58400f8515d6768877c47b7592daa0f0c7cd82 (patch) | |
tree | 5c89a50970693ced9c59ef4e791492d60094d3a5 /gcc | |
parent | 5ac6158d0b938f95a80827c7c72b5fadc4976ca7 (diff) | |
download | gcc-3a58400f8515d6768877c47b7592daa0f0c7cd82.zip gcc-3a58400f8515d6768877c47b7592daa0f0c7cd82.tar.gz gcc-3a58400f8515d6768877c47b7592daa0f0c7cd82.tar.bz2 |
(output_move_double): Fix up the test for overlap
of source address with operands[0].
From-SVN: r5987
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/m68k/m68k.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 4f71e05..1e29a6d 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -1077,11 +1077,14 @@ output_move_double (operands) if (optype0 == REGOP && (optype1 == OFFSOP || optype1 == MEMOP)) { - if (reg_overlap_mentioned_p (operands[0], XEXP (operands[1], 0)) + rtx testlow = gen_rtx (REG, SImode, REGNO (operands[0])); + + if (reg_overlap_mentioned_p (testlow, XEXP (operands[1], 0)) && reg_overlap_mentioned_p (latehalf[0], XEXP (operands[1], 0))) { /* If both halves of dest are used in the src memory address, - compute the address into latehalf of dest. */ + compute the address into latehalf of dest. + Note that this can't happen if the dest is two data regs. */ compadr: xops[0] = latehalf[0]; xops[1] = XEXP (operands[1], 0); @@ -1102,8 +1105,13 @@ compadr: && reg_overlap_mentioned_p (middlehalf[0], XEXP (operands[1], 0))) { - /* Check for two regs used by both source and dest. */ - if (reg_overlap_mentioned_p (operands[0], XEXP (operands[1], 0)) + /* Check for two regs used by both source and dest. + Note that this can't happen if the dest is all data regs. + It can happen if the dest is d6, d7, a0. + But in that case, latehalf is an addr reg, so + the code at compadr does ok. */ + + if (reg_overlap_mentioned_p (testlow, XEXP (operands[1], 0)) || reg_overlap_mentioned_p (latehalf[0], XEXP (operands[1], 0))) goto compadr; |