* config/ia64/ia64.md (trap, conditional_trap): New.
authorRichard Henderson <rth@redhat.com>
Thu, 18 Apr 2002 19:45:36 +0000 (12:45 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 18 Apr 2002 19:45:36 +0000 (12:45 -0700)
From-SVN: r52487

gcc/ChangeLog
gcc/config/ia64/ia64.md

index 2676cb0036bd0bcac7c638e36b8a798bdf8e4f6e..05a5f093a186dca19e72f6b04633fa43db94c9b1 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-18  Richard Henderson  <rth@redhat.com>
+
+       * config/ia64/ia64.md (trap, conditional_trap): New.
+
 2002-04-18  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/6358
index a7d7dcaab74de9b1e4f68935904bcf55cf38c37a..9a2f9de7d072f534b36a4c6e61fff6926654e4fb 100644 (file)
   [(set_attr "itanium_class" "stop_bit")
    (set_attr "predicable" "no")])
 
+(define_expand "trap"
+  [(trap_if (const_int 1) (const_int 0))]
+  ""
+  "")
+
+;; ??? We don't have a match-any slot type.  Setting the type to unknown
+;; produces worse code that setting the slot type to A.
+
+(define_insn "*trap"
+  [(trap_if (const_int 1) (match_operand 0 "const_int_operand" ""))]
+  ""
+  "break %0"
+  [(set_attr "itanium_class" "chk_s")])
+
+(define_expand "conditional_trap"
+  [(trap_if (match_operand 0 "" "") (match_operand 1 "" ""))]
+  ""
+{
+  operands[0] = ia64_expand_compare (GET_CODE (operands[0]), VOIDmode);
+})
+
+(define_insn "*conditional_trap"
+  [(trap_if (match_operator 0 "predicate_operator"
+             [(match_operand:BI 1 "register_operand" "c")
+              (const_int 0)])  
+           (match_operand 2 "const_int_operand" ""))]
+  ""
+  "(%j0) break %2"
+  [(set_attr "itanium_class" "chk_s")
+   (set_attr "predicable" "no")])
+
 (define_insn "break_f"
   [(unspec_volatile [(const_int 0)] 3)]
   ""