From 7887873043af19be5945e3af18aca85e9e3d476b Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Wed, 10 Mar 1993 16:56:43 +0000 Subject: [PATCH] (conditional move): Use %B for output when appropriate. (conditional move with second operand == 0): New pattern. From-SVN: r3692 --- gcc/config/pa/pa.md | 46 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 49f1019214d7..1b5982081b73 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 -- 2.43.5