Wed Sep 22 06:06:57 1999 Jeffrey A Law (law@cygnus.com)
+ * pa.md (subsi3): Turn into an expander. Create two anonymous
+ patterns. One for PA2.0 one for PA1.x. Use mtsarcm for PA2.0.
+
* pa.md (floatunssisf2, floatunssidf2): Generate different RTL
for TARGET_PA_20.
(floatunssidf2_pa20, floatunssisf2_pa20): New patterns for PA2.0
[(set_attr "type" "binary")
(set_attr "length" "8")])
-(define_insn "subsi3"
+(define_expand "subsi3"
+ [(set (match_operand:SI 0 "register_operand" "")
+ (minus:SI (match_operand:SI 1 "arith11_operand" "")
+ (match_operand:SI 2 "register_operand" "")))]
+ ""
+ "")
+
+(define_insn ""
[(set (match_operand:SI 0 "register_operand" "=r,r")
(minus:SI (match_operand:SI 1 "arith11_operand" "r,I")
(match_operand:SI 2 "register_operand" "r,r")))]
- ""
+ "!TARGET_PA_20"
"@
sub %1,%2,%0
subi %1,%2,%0"
[(set_attr "type" "binary,binary")
(set_attr "length" "4,4")])
+(define_insn ""
+ [(set (match_operand:SI 0 "register_operand" "=r,r,q")
+ (minus:SI (match_operand:SI 1 "arith11_operand" "r,I,S")
+ (match_operand:SI 2 "register_operand" "r,r,r")))]
+ "TARGET_PA_20"
+ "@
+ sub %1,%2,%0
+ subi %1,%2,%0
+ mtsarcm %2"
+ [(set_attr "type" "binary,binary,move")
+ (set_attr "length" "4,4,4")])
+
;; Clobbering a "register_operand" instead of a match_scratch
;; in operand3 of millicode calls avoids spilling %r1 and
;; produces better code.