aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@superh.com>2002-10-09 15:07:19 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2002-10-09 16:07:19 +0100
commite3c6252002eac3c1feb387ecc753ccfebd21abcd (patch)
treebf5fe0965a5337e9671941c198610963cb8606dd
parent0c479bf5caffe5dc8a75edab703dc0616f375661 (diff)
downloadgcc-e3c6252002eac3c1feb387ecc753ccfebd21abcd.zip
gcc-e3c6252002eac3c1feb387ecc753ccfebd21abcd.tar.gz
gcc-e3c6252002eac3c1feb387ecc753ccfebd21abcd.tar.bz2
* sh.md (ffssi2): Fix emitted code.
From-SVN: r57984
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/sh/sh.md13
2 files changed, 11 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fa25ad7..5df0457 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+Wed Oct 9 15:54:49 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * sh.md (ffssi2): Fix emitted code.
+
2002-10-09 Ulrich Weigand <uweigand@de.ibm.com>
* cse.c (insn_live_p): Pass insn pattern, not full insn
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index b237664..2c02ee3 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -10380,14 +10380,15 @@
rtx discratch = gen_reg_rtx (DImode);
rtx last;
- emit_insn (gen_adddi3z_media (discratch, operands[1],
- force_reg (SImode, GEN_INT (-1))));
- emit_insn (gen_andcdi3 (discratch, discratch,
- simplify_gen_subreg (DImode, operands[1],
- SImode, 0)));
+ emit_insn (gen_adddi3 (discratch,
+ simplify_gen_subreg (DImode, operands[1], SImode, 0),
+ GEN_INT (-1)));
+ emit_insn (gen_andcdi3 (discratch,
+ simplify_gen_subreg (DImode, operands[1], SImode, 0),
+ discratch));
emit_insn (gen_nsbsi (scratch, discratch));
last = emit_insn (gen_subsi3 (operands[0],
- force_reg (SImode, GEN_INT (-64)), scratch));
+ force_reg (SImode, GEN_INT (63)), scratch));
REG_NOTES (last)
= gen_rtx_EXPR_LIST (REG_EQUAL,
gen_rtx_FFS (SImode, operands[0]), REG_NOTES (last));