(addsi3,ashlsi3): Handle the case where the stack pointer appears as an
index reg. From-SVN: r2140
This commit is contained in:
parent
3292923dd1
commit
442426450e
@ -1392,8 +1392,20 @@
|
|||||||
if (! TARGET_486 || ! REG_P (operands[2]))
|
if (! TARGET_486 || ! REG_P (operands[2]))
|
||||||
{
|
{
|
||||||
CC_STATUS_INIT;
|
CC_STATUS_INIT;
|
||||||
operands[1] = SET_SRC (PATTERN (insn));
|
|
||||||
return AS2 (lea%L0,%a1,%0);
|
if (operands[2] == stack_pointer_rtx)
|
||||||
|
{
|
||||||
|
rtx temp;
|
||||||
|
|
||||||
|
temp = operands[1];
|
||||||
|
operands[1] = operands[2];
|
||||||
|
operands[2] = temp;
|
||||||
|
}
|
||||||
|
if (operands[2] != stack_pointer_rtx)
|
||||||
|
{
|
||||||
|
operands[1] = SET_SRC (PATTERN (insn));
|
||||||
|
return AS2 (lea%L0,%a1,%0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
output_asm_insn (AS2 (mov%L0,%1,%0), operands);
|
output_asm_insn (AS2 (mov%L0,%1,%0), operands);
|
||||||
@ -2391,6 +2403,12 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
CC_STATUS_INIT;
|
CC_STATUS_INIT;
|
||||||
|
|
||||||
|
if (operands[1] == stack_pointer_rtx)
|
||||||
|
{
|
||||||
|
output_asm_insn (AS2 (mov%L0,%1,%0), operands);
|
||||||
|
operands[1] = operands[0];
|
||||||
|
}
|
||||||
operands[1] = gen_rtx (MULT, SImode, operands[1],
|
operands[1] = gen_rtx (MULT, SImode, operands[1],
|
||||||
GEN_INT (1 << INTVAL (operands[2])));
|
GEN_INT (1 << INTVAL (operands[2])));
|
||||||
return AS2 (lea%L0,%a1,%0);
|
return AS2 (lea%L0,%a1,%0);
|
||||||
|
Loading…
Reference in New Issue
Block a user