Commit d7e8d581 by Richard Stallman

(output_move_double): Use reg_overlap_mentioned_p when checking for overlap…

(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
parent b07b4e49
...@@ -1077,15 +1077,15 @@ output_move_double (operands) ...@@ -1077,15 +1077,15 @@ output_move_double (operands)
if (optype0 == REGOP if (optype0 == REGOP
&& (optype1 == OFFSOP || optype1 == MEMOP)) && (optype1 == OFFSOP || optype1 == MEMOP))
{ {
if (reg_mentioned_p (operands[0], XEXP (operands[1], 0)) if (reg_overlap_mentioned_p (operands[0], XEXP (operands[1], 0))
&& reg_mentioned_p (latehalf[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, /* 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. */
compadr: compadr:
xops[0] = latehalf[0]; xops[0] = latehalf[0];
xops[1] = XEXP (operands[1], 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 ) if( GET_MODE (operands[1]) == XFmode )
{ {
operands[1] = gen_rtx (MEM, XFmode, latehalf[0]); operands[1] = gen_rtx (MEM, XFmode, latehalf[0]);
...@@ -1099,16 +1099,17 @@ compadr: ...@@ -1099,16 +1099,17 @@ compadr:
} }
} }
else if (size == 12 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. */ /* Check for two regs used by both source and dest. */
if (reg_mentioned_p (operands[0], XEXP (operands[1], 0)) if (reg_overlap_mentioned_p (operands[0], XEXP (operands[1], 0))
|| reg_mentioned_p (latehalf[0], XEXP (operands[1], 0))) || reg_overlap_mentioned_p (latehalf[0], XEXP (operands[1], 0)))
goto compadr; goto compadr;
/* JRV says this can't happen: */ /* JRV says this can't happen: */
if (addreg0 || addreg1) if (addreg0 || addreg1)
abort(); abort ();
/* Only the middle reg conflicts; simply put it last. */ /* Only the middle reg conflicts; simply put it last. */
output_asm_insn (singlemove_string (operands), operands); output_asm_insn (singlemove_string (operands), operands);
...@@ -1116,7 +1117,7 @@ compadr: ...@@ -1116,7 +1117,7 @@ compadr:
output_asm_insn (singlemove_string (middlehalf), middlehalf); output_asm_insn (singlemove_string (middlehalf), middlehalf);
return ""; 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 /* If the low half of dest is mentioned in the source memory
address, the arrange to emit the move late half first. */ address, the arrange to emit the move late half first. */
dest_overlapped_low = 1; dest_overlapped_low = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment