diff options
author | Jeff Law <law@gcc.gnu.org> | 1995-11-28 10:49:46 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1995-11-28 10:49:46 -0700 |
commit | 141b2e9f0543021ee1d868310e01c36b235b716d (patch) | |
tree | bfc6a8c78b3e81d4f7087d49067403fcb00af851 | |
parent | 1ace9b605280a3134cc93f924420dd77d3b176be (diff) | |
download | gcc-141b2e9f0543021ee1d868310e01c36b235b716d.zip gcc-141b2e9f0543021ee1d868310e01c36b235b716d.tar.gz gcc-141b2e9f0543021ee1d868310e01c36b235b716d.tar.bz2 |
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
-rw-r--r-- | gcc/config/pa/pa.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 782e7dc..4f3c92a 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -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; }") |