aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gnu.org>1993-03-10 16:56:43 +0000
committerTorbjorn Granlund <tege@gnu.org>1993-03-10 16:56:43 +0000
commit7887873043af19be5945e3af18aca85e9e3d476b (patch)
tree03f73c86af6c083843ede7d55377e7c6826ffca2
parent7bbc6432548b174e720601a42775d7f248e3c9e2 (diff)
downloadgcc-7887873043af19be5945e3af18aca85e9e3d476b.zip
gcc-7887873043af19be5945e3af18aca85e9e3d476b.tar.gz
gcc-7887873043af19be5945e3af18aca85e9e3d476b.tar.bz2
(conditional move): Use %B for output when appropriate.
(conditional move with second operand == 0): New pattern. From-SVN: r3692
-rw-r--r--gcc/config/pa/pa.md46
1 files changed, 35 insertions, 11 deletions
diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md
index 49f1019..1b59820 100644
--- a/gcc/config/pa/pa.md
+++ b/gcc/config/pa/pa.md
@@ -490,24 +490,48 @@
[(set_attr "type" "binary,binary")
(set_attr "length" "2,3")])
-;;; Experimental conditional move
+;;; Experimental conditional move patterns
-(define_insn "cmov"
- [(set (match_operand:SI 0 "register_operand" "=r,r,r,r")
+; We need the first constraint alternative in order to avoid
+; earlyclobbers on all other alternatives.
+(define_insn ""
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r")
+ (if_then_else:SI
+ (match_operator 5 "comparison_operator"
+ [(match_operand:SI 3 "register_operand" "r,r,r,r,r")
+ (match_operand:SI 4 "arith11_operand" "rI,rI,rI,rI,rI")])
+ (match_operand:SI 1 "reg_or_cint_move_operand" "0,r,J,N,K")
+ (const_int 0)))]
+ ""
+ "@
+ com%I4clr,%S5 %4,%3,0\;ldi 0,%0
+ com%I4clr,%B5 %4,%3,%0\;copy %1,%0
+ com%I4clr,%B5 %4,%3,%0\;ldi %1,%0
+ com%I4clr,%B5 %4,%3,%0\;ldil L'%1,%0
+ com%I4clr,%B5 %4,%3,%0\;zdepi %Z1,%0"
+ [(set_attr "type" "multi,multi,multi,multi,multi")
+ (set_attr "length" "2,2,2,2,2")])
+
+(define_insn ""
+ [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r,r,r,r")
(if_then_else:SI
(match_operator 5 "comparison_operator"
- [(match_operand:SI 3 "register_operand" "r,r,r,r")
- (match_operand:SI 4 "arith5_operand" "rL,rL,rL,rL")])
- (match_operand:SI 1 "arith11_operand" "0,0,r,I")
- (match_operand:SI 2 "arith11_operand" "r,I,0,0")))]
+ [(match_operand:SI 3 "register_operand" "r,r,r,r,r,r,r,r")
+ (match_operand:SI 4 "arith11_operand" "rI,rI,rI,rI,rI,rI,rI,rI")])
+ (match_operand:SI 1 "reg_or_cint_move_operand" "0,0,0,0,r,J,N,K")
+ (match_operand:SI 2 "reg_or_cint_move_operand" "r,J,N,K,0,0,0,0")))]
""
"@
com%I4clr,%S5 %4,%3,0\;copy %2,%0
com%I4clr,%S5 %4,%3,0\;ldi %2,%0
- com%I4clr,%S5 %4,%3,0\;copy %1,%0
- com%I4clr,%S5 %4,%3,0\;ldi %1,%0"
- [(set_attr "type" "multi,multi,multi,multi")
- (set_attr "length" "2,2,2,2")])
+ com%I4clr,%S5 %4,%3,0\;ldil L'%2,%0
+ com%I4clr,%S5 %4,%3,0\;zdepi %Z2,%0
+ com%I4clr,%B5 %4,%3,0\;copy %1,%0
+ com%I4clr,%B5 %4,%3,0\;ldi %1,%0
+ com%I4clr,%B5 %4,%3,0\;ldil L'%1,%0
+ com%I4clr,%B5 %4,%3,0\;zdepi %Z1,%0"
+ [(set_attr "type" "multi,multi,multi,multi,multi,multi,multi,multi")
+ (set_attr "length" "2,2,2,2,2,2,2,2")])
;; Conditional Branches