diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-05 19:00:56 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-05 19:00:56 -0400 |
commit | a1efcf3c405f3ae4b76a4778bbb6326f4bb83c50 (patch) | |
tree | 3d24ed44544526fa370569aa1e242dfa916edbed | |
parent | 7f49c33119611c0ec226b3497a60520a4d79fac9 (diff) | |
download | gcc-a1efcf3c405f3ae4b76a4778bbb6326f4bb83c50.zip gcc-a1efcf3c405f3ae4b76a4778bbb6326f4bb83c50.tar.gz gcc-a1efcf3c405f3ae4b76a4778bbb6326f4bb83c50.tar.bz2 |
(cmpdi): Rewrite to avoid bogus matching constraints.
From-SVN: r9880
-rw-r--r-- | gcc/config/m68k/m68k.md | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md index e978d2b..e16004e 100644 --- a/gcc/config/m68k/m68k.md +++ b/gcc/config/m68k/m68k.md @@ -411,23 +411,33 @@ ;; compare instructions. -(define_insn "cmpdi" +(define_expand "cmpdi" + [(parallel + [(set (cc0) + (compare (match_operand:DI 0 "nonimmediate_operand" "") + (match_operand:DI 1 "general_operand" ""))) + (clobber (match_dup 2))])] + "" + " +{ + operands[2] = gen_reg_rtx (DImode); +}") + +(define_insn "" [(set (cc0) -;; (compare (match_operand:DI 0 "general_operand" "=&d*a") -;; (compare (match_operand:DI 0 "general_operand" "+&d*a") -;; (compare (match_operand:DI 0 "general_operand" "+d*a") - (compare (match_operand:DI 0 "general_operand" "d*a") - (match_operand:DI 1 "general_operand" "d"))) - (clobber (match_scratch:DI 2 "=0"))] + (compare (match_operand:DI 1 "nonimmediate_operand" "0,d") + (match_operand:DI 2 "general_operand" "d,0"))) + (clobber (match_operand:DI 0 "register_operand" "=d,d"))] "" "* { - operands[2] = gen_rtx (REG, SImode, REGNO (operands[0]) + 1); - operands[3] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); - if (DATA_REG_P (operands[0])) - return \"sub%.l %3,%2\;subx%.l %1,%0\"; + if (rtx_equal_p (operands[0], operands[1])) + return \"sub%.l %R2,%R0\;subx%.l %2,%0\"; else - return \"exg %/d0,%2\;sub%.l %3,%/d0\;exg %/d0,%0\;subx%.l %1,%/d0\;exg %/d0,%2\"; + { + return \"sub%.l %R1,%R0\;subx%.l %1,%0\"; + cc_status.flags |= CC_REVERSED; + } }") ;; This is the second "hook" for PIC code (in addition to movsi). See |