;; A composite of the cmp, cmpa, cmpi & cmpm m68000 op codes.
+;;
+;; In theory we ought to be able to use some 'S' constraints and
+;; operand predicates that allow PC-rel addressing modes in the
+;; comparison patterns and expanders below. But we would have to be
+;; cognizant of the fact that PC-rel addresses are not allowed for
+;; both operands and determining whether or not we emit the operands in
+;; order or reversed is not trivial to do just based on the constraints
+;; and operand predicates. So to be safe, just don't allow the PC-rel
+;; versions in the various comparison expanders, patterns, for comparisons.
(define_insn ""
[(set (cc0)
- (compare (match_operand:SI 0 "nonimmediate_operand" "rKT,rKs,mSr,mSa,>")
- (match_operand:SI 1 "general_src_operand" "mSr,mSa,KTr,Ksr,>")))]
+ (compare (match_operand:SI 0 "nonimmediate_operand" "rKT,rKs,mr,ma,>")
+ (match_operand:SI 1 "general_operand" "mr,ma,KTr,Ksr,>")))]
"!TARGET_COLDFIRE"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
(define_expand "cbranchhi4"
[(set (cc0)
- (compare (match_operand:HI 1 "nonimmediate_src_operand" "")
+ (compare (match_operand:HI 1 "nonimmediate_operand" "")
(match_operand:HI 2 "m68k_subword_comparison_operand" "")))
(set (pc)
(if_then_else (match_operator 0 "ordered_comparison_operator"
(define_insn ""
[(set (cc0)
- (compare (match_operand:HI 0 "nonimmediate_src_operand" "rnmS,d,n,mS,>")
- (match_operand:HI 1 "general_src_operand" "d,rnmS,mS,n,>")))]
+ (compare (match_operand:HI 0 "nonimmediate_operand" "rnm,d,n,m,>")
+ (match_operand:HI 1 "general_operand" "d,rnm,m,n,>")))]
"!TARGET_COLDFIRE"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)
(define_expand "cbranchqi4"
[(set (cc0)
- (compare (match_operand:QI 1 "nonimmediate_src_operand" "")
+ (compare (match_operand:QI 1 "nonimmediate_operand" "")
(match_operand:QI 2 "m68k_subword_comparison_operand" "")))
(set (pc)
(if_then_else (match_operator 0 "ordered_comparison_operator"
(define_expand "cstoreqi4"
[(set (cc0)
- (compare (match_operand:QI 2 "nonimmediate_src_operand" "")
+ (compare (match_operand:QI 2 "nonimmediate_operand" "")
(match_operand:QI 3 "m68k_subword_comparison_operand" "")))
(set (match_operand:QI 0 "register_operand")
(match_operator:QI 1 "ordered_comparison_operator"
(define_insn ""
[(set (cc0)
- (compare (match_operand:QI 0 "nonimmediate_src_operand" "dn,dmS,>")
- (match_operand:QI 1 "general_src_operand" "dmS,nd,>")))]
+ (compare (match_operand:QI 0 "nonimmediate_operand" "dn,dm,>")
+ (match_operand:QI 1 "general_operand" "dm,nd,>")))]
"!TARGET_COLDFIRE"
{
if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM)