aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-12-11 18:47:38 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1993-12-11 18:47:38 -0500
commit39b52ba283d33065f631225ee69269421e1b1867 (patch)
tree6f37b08e6ace41acc074cb33ac29420a299170be /gcc
parent3eda169fe0b58eb4a5582e4ac725ed1dce5e1240 (diff)
downloadgcc-39b52ba283d33065f631225ee69269421e1b1867.zip
gcc-39b52ba283d33065f631225ee69269421e1b1867.tar.gz
gcc-39b52ba283d33065f631225ee69269421e1b1867.tar.bz2
(modsi3): Correct error in last change.
From-SVN: r6212
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/rs6000.md16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 4d484f4..bd8fc6b 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -765,15 +765,21 @@
[(use (match_operand:SI 0 "gpc_reg_operand" ""))
(use (match_operand:SI 1 "gpc_reg_operand" ""))
(use (match_operand:SI 2 "const_int_operand" ""))]
- "exact_log2 (INTVAL (operands[2])) >= 0"
+ ""
"
{
- rtx temp1 = gen_reg_rtx (SImode);
- rtx temp2 = gen_reg_rtx (SImode);
+ int i = exact_log2 (INTVAL (operands[2]));
+ rtx temp1;
+ rtx temp2;
+
+ if (i < 0)
+ FAIL;
+
+ temp1 = gen_reg_rtx (SImode);
+ temp2 = gen_reg_rtx (SImode);
emit_insn (gen_divsi3 (temp1, operands[1], operands[2]));
- emit_insn (gen_ashlsi3 (temp2, temp1,
- GEN_INT (exact_log2 (INTVAL (operands[2])))));
+ emit_insn (gen_ashlsi3 (temp2, temp1, GEN_INT (i)));
emit_insn (gen_subsi3 (operands[0], operands[1], temp2));
DONE;