aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-02-15 18:45:23 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1997-02-15 18:45:23 -0500
commit6ac62473ac5ba9253d461fc737417d64dc24823b (patch)
treef5ef4b3552a8d3f51525fbb6c8bb6f777ab949f8
parenta7e2b01447165237dad6df2fe2ee5c4fda6aed5e (diff)
downloadgcc-6ac62473ac5ba9253d461fc737417d64dc24823b.zip
gcc-6ac62473ac5ba9253d461fc737417d64dc24823b.tar.gz
gcc-6ac62473ac5ba9253d461fc737417d64dc24823b.tar.bz2
(cmpsi): Added insn with appropriate constraints for TARGET_5200;
changed condition of existing insn to !TARGET_5200. From-SVN: r13649
-rw-r--r--gcc/config/m68k/m68k.md29
1 files changed, 26 insertions, 3 deletions
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 83d3879..058f474 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -485,12 +485,12 @@
}
}")
-;; A composite of the cmp, cmpa, & cmpi m68000 op codes.
+;; A composite of the cmp, cmpa, cmpi & cmpm m68000 op codes.
(define_insn ""
[(set (cc0)
(compare (match_operand:SI 0 "nonimmediate_operand" "rKs,mr,>")
- (match_operand:SI 1 "general_operand" "mr,Ksr,>")))]
- ""
+ (match_operand:SI 1 "general_operand" "mr,rKs,>")))]
+ "!TARGET_5200"
"*
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
@@ -515,6 +515,29 @@
#endif
}")
+(define_insn ""
+ [(set (cc0)
+ (compare (match_operand:SI 0 "nonimmediate_operand" "mrKs,r")
+ (match_operand:SI 1 "general_operand" "r,mrKs")))]
+ "TARGET_5200"
+ "*
+{
+ if (REG_P (operands[1])
+ || (!REG_P (operands[0]) && GET_CODE (operands[0]) != MEM))
+ { cc_status.flags |= CC_REVERSED;
+#ifdef SGS_CMP_ORDER
+ return \"cmp%.l %d1,%d0\";
+#else
+ return \"cmp%.l %d0,%d1\";
+#endif
+ }
+#ifdef SGS_CMP_ORDER
+ return \"cmp%.l %d0,%d1\";
+#else
+ return \"cmp%.l %d1,%d0\";
+#endif
+}")
+
(define_insn "cmphi"
[(set (cc0)
(compare (match_operand:HI 0 "nonimmediate_operand" "rnm,d,n,m,>")