cc_status.value1 = SET_SRC (body);
break;
+ case CC_INVERT:
+ /* The insn is a compare instruction. */
+ CC_STATUS_INIT;
+ cc_status.value1 = SET_SRC (body);
+ cc_status.flags |= CC_INVERTED;
+ break;
+
case CC_CLOBBER:
/* Insn doesn't leave CC in a usable state. */
CC_STATUS_INIT;
;; set_zn_c0 - insn sets z,n to usable values. v is unknown. c may or may not
;; be known (if it isn't that's ok, we don't need it anyway).
;; compare - compare instruction
+;; invert -- like compare, but flags are inverted.
;; clobber - value of cc is unknown
-(define_attr "cc" "none,none_0hit,tst,set_zn_c0,compare,clobber"
+(define_attr "cc" "none,none_0hit,tst,set_zn_c0,compare,clobber,invert"
(const_string "clobber"))
\f
;; ----------------------------------------------------------------------
(define_insn "cmpsi"
[(set (cc0)
- (compare (match_operand:SI 0 "register_operand" "da")
- (match_operand:SI 1 "nonmemory_operand" "dai")))]
+ (compare (match_operand:SI 0 "register_operand" "!*d*a,da")
+ (match_operand:SI 1 "nonmemory_operand" "!*0,dai")))]
""
- "cmp %1,%0"
- [(set_attr "cc" "compare")])
+ "@
+ add 0,%0
+ cmp %1,%0"
+ [(set_attr "cc" "invert,compare")])
\f
;; ----------------------------------------------------------------------
;; ADD INSTRUCTIONS