Split decrement_and_branch_until_zero until define_expand/define_insn
authorMichael Meissner <meissner@gcc.gnu.org>
Fri, 1 Dec 1995 14:32:15 +0000 (14:32 +0000)
committerMichael Meissner <meissner@gcc.gnu.org>
Fri, 1 Dec 1995 14:32:15 +0000 (14:32 +0000)
From-SVN: r10660

gcc/config/fx80/fx80.md
gcc/config/m68k/m68k.md
gcc/config/m88k/m88k.md

index 641ba9aea803c55e8de542d9ae01a4f27ad82296..d12fb58d63d1a13f8a75fb90efc8c1f9fc048830 100644 (file)
 
 ;; dbra patterns that use REG_NOTES info generated by strength_reduce.
 
-(define_insn "decrement_and_branch_until_zero"
+(define_expand "decrement_and_branch_until_zero"
+  [(parallel [(set (pc)
+                  (if_then_else
+                   (ge (match_operand:SI 0 "general_operand" "")
+                       (const_int 1))
+                   (label_ref (match_operand 1 "" ""))
+                   (pc)))
+             (set (match_dup 0)
+                  (plus:SI (match_dup 0)
+                           (const_int -1)))])]
+  ""
+  "")
+
+(define_insn ""
   [(set (pc)
        (if_then_else
          (ge (match_operand:SI 0 "general_operand" "d,m,g")
index 9e2a60a40a107361169ad88768a6b9d288a01e46..1f243ac0fd5fceafe7b208d6bc64dbe35a13c212 100644 (file)
 #endif /* not MOTOROLA */
 }")
 
-(define_insn "decrement_and_branch_until_zero"
+(define_expand "decrement_and_branch_until_zero"
+  [(parallel [(set (pc)
+                  (if_then_else
+                   (ge (plus:SI (match_operand:SI 0 "general_operand" "")
+                                (const_int -1))
+                       (const_int 0))
+                   (label_ref (match_operand 1 "" ""))
+                   (pc)))
+             (set (match_dup 0)
+                  (plus:SI (match_dup 0)
+                           (const_int -1)))])]
+  ""
+  "")
+
+(define_insn ""
   [(set (pc)
        (if_then_else
          (ge (plus:SI (match_operand:SI 0 "general_operand" "+d*am")
index 188e6cc075de23db0784108c032eda181460fe85..3f6642baab50673f641bec79eb33c61af8538c39 100644 (file)
 ;; reloads, hence the `m' constraints.  The `!' constraints direct reload
 ;; to not choose the register alternatives in the event a reload is needed.
 
-(define_insn "decrement_and_branch_until_zero"
+(define_expand "decrement_and_branch_until_zero"
+  [(parallel [(set (pc)
+                  (if_then_else
+                   (match_operator 0 "relop_no_unsigned"
+                                   [(match_operand:SI 1 "register_operand" "")
+                                    (const_int 0)])
+                   (label_ref (match_operand 2 "" ""))
+                   (pc)))
+             (set (match_dup 1)
+                  (plus:SI (match_dup 1)
+                           (match_operand:SI 3 "add_operand" "")))
+             (clobber (match_scratch:SI 4 ""))
+             (clobber (match_scratch:SI 5 "=X,X,&r,&r"))])]
+  ""
+  "")
+
+(define_insn ""
   [(set (pc)
        (if_then_else
         (match_operator 0 "relop_no_unsigned"