OSDN Git Service

(conditional move): Use %B for output when appropriate.
authortege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Mar 1993 16:56:43 +0000 (16:56 +0000)
committertege <tege@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Mar 1993 16:56:43 +0000 (16:56 +0000)
(conditional move with second operand == 0): New pattern.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3692 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/pa/pa.md

index 49f1019..1b59820 100644 (file)
   [(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