aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-10-21 04:33:51 +0000
committerRichard Stallman <rms@gnu.org>1993-10-21 04:33:51 +0000
commitd7e8d5811667a80aea6aad9f73ff6d6496a5ed13 (patch)
treea2ece5dbe574d682b073f51555e977a2130d79d1
parentb07b4e490d98864f273293961c716f01f2954bc3 (diff)
downloadgcc-d7e8d5811667a80aea6aad9f73ff6d6496a5ed13.zip
gcc-d7e8d5811667a80aea6aad9f73ff6d6496a5ed13.tar.gz
gcc-d7e8d5811667a80aea6aad9f73ff6d6496a5ed13.tar.bz2
(output_move_double): Use reg_overlap_mentioned_p when checking for overlap between source and dest.
(output_move_double): Use reg_overlap_mentioned_p when checking for overlap between source and dest. Fix syntax for the lea insn for double overlap case. From-SVN: r5857
-rw-r--r--gcc/config/m68k/m68k.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index 51e4bd9..0fc5afa 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -1077,15 +1077,15 @@ output_move_double (operands)
if (optype0 == REGOP
&& (optype1 == OFFSOP || optype1 == MEMOP))
{
- if (reg_mentioned_p (operands[0], XEXP (operands[1], 0))
- && reg_mentioned_p (latehalf[0], XEXP (operands[1], 0)))
+ if (reg_overlap_mentioned_p (operands[0], 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. */
compadr:
xops[0] = latehalf[0];
xops[1] = XEXP (operands[1], 0);
- output_asm_insn ("lea%L0,%a1,%0", xops);
+ output_asm_insn ("lea %a1,%0", xops);
if( GET_MODE (operands[1]) == XFmode )
{
operands[1] = gen_rtx (MEM, XFmode, latehalf[0]);
@@ -1099,16 +1099,17 @@ compadr:
}
}
else if (size == 12
- && reg_mentioned_p (middlehalf[0], XEXP (operands[1], 0)))
+ && reg_overlap_mentioned_p (middlehalf[0],
+ XEXP (operands[1], 0)))
{
/* Check for two regs used by both source and dest. */
- if (reg_mentioned_p (operands[0], XEXP (operands[1], 0))
- || reg_mentioned_p (latehalf[0], XEXP (operands[1], 0)))
- goto compadr;
+ if (reg_overlap_mentioned_p (operands[0], XEXP (operands[1], 0))
+ || reg_overlap_mentioned_p (latehalf[0], XEXP (operands[1], 0)))
+ goto compadr;
/* JRV says this can't happen: */
if (addreg0 || addreg1)
- abort();
+ abort ();
/* Only the middle reg conflicts; simply put it last. */
output_asm_insn (singlemove_string (operands), operands);
@@ -1116,7 +1117,7 @@ compadr:
output_asm_insn (singlemove_string (middlehalf), middlehalf);
return "";
}
- else if (reg_mentioned_p (operands[0], XEXP (operands[1], 0)))
+ else if (reg_overlap_mentioned_p (operands[0], XEXP (operands[1], 0)))
/* If the low half of dest is mentioned in the source memory
address, the arrange to emit the move late half first. */
dest_overlapped_low = 1;