pa.md (subsi3): Turn into an expander.

* pa.md (subsi3): Turn into an expander.  Create two anonymous
        patterns.  One for PA2.0 one for PA1.x.  Use mtsarcm for PA2.0.

From-SVN: r29596
This commit is contained in:
Jeffrey A Law 1999-09-22 20:10:13 +00:00 committed by Jeff Law
parent 06bcc17883
commit 635d1437cb
2 changed files with 24 additions and 2 deletions

View File

@ -37,6 +37,9 @@ Wed Sep 22 06:25:15 1999 Jim Kingdon <http://developer.redhat.com>
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

View File

@ -3153,17 +3153,36 @@
[(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.