pa.md (define split for (plus (reg) (large_constant)): Try another way to handle this with only 2 insns.

* pa.md (define split for (plus (reg) (large_constant)): Try
        another way to handle this with only 2 insns.  From Tege.

From-SVN: r10616
This commit is contained in:
Jeff Law 1995-11-28 10:49:46 -07:00
parent 1ace9b6052
commit 141b2e9f05

View File

@ -2903,7 +2903,10 @@
/* Try dividing the constant by 2, then 4, and finally 8 to see
if we can get a constant which can be loaded into a register
in a single instruction (cint_ok_for_move). */
in a single instruction (cint_ok_for_move).
If that fails, try to negate the constant and subtract it
from our input operand. */
if (intval % 2 == 0 && cint_ok_for_move (intval / 2))
{
operands[2] = GEN_INT (intval / 2);
@ -2919,6 +2922,12 @@
operands[2] = GEN_INT (intval / 8);
operands[3] = GEN_INT (8);
}
else if (cint_ok_for_move (-intval))
{
emit_insn (gen_rtx (SET, VOIDmode, operands[4], GEN_INT (-intval)));
emit_insn (gen_subsi3 (operands[0], operands[1], operands[4]));
DONE;
}
else
FAIL;
}")