TILEPro/TILE-Gx: add trap patterns
authorWalter Lee <walt@tilera.com>
Wed, 23 Nov 2016 04:35:43 +0000 (04:35 +0000)
committerWalter Lee <walt@gcc.gnu.org>
Wed, 23 Nov 2016 04:35:43 +0000 (04:35 +0000)
* config/tilegx/tilegx.md (trap): New pattern.
* config/tilepro/tilepro.md (trap): Likewise.

From-SVN: r242735

gcc/ChangeLog
gcc/config/tilegx/tilegx.md
gcc/config/tilepro/tilepro.md

index a7a776e..97320c7 100644 (file)
@@ -1,5 +1,10 @@
 2016-11-22  Walter Lee  <walt@tilera.com>
 
+       * config/tilegx/tilegx.md (trap): New pattern.
+       * config/tilepro/tilepro.md (trap): Likewise.
+
+2016-11-22  Walter Lee  <walt@tilera.com>
+
        * config/tilegx/tilegx.md (*zero_extract): Use
        define_insn_and_split instead of define_insn; Handle pos + size >
        64.
index 3ad5a87..eccdd28 100644 (file)
   "nop"
   [(set_attr "type" "Y01")])
 
+(define_insn "trap"
+  [(trap_if (const_int 1) (const_int 0))]
+  ""
+  "raise; moveli zero, 6"
+  [(set_attr "type" "cannot_bundle")])
+
 \f
 ;;
 ;; Conditional branches
index 6493b06..d1536ed 100644 (file)
   "nop"
   [(set_attr "type" "Y01")])
 
+(define_insn "trap"
+  [(trap_if (const_int 1) (const_int 0))]
+  ""
+  "raise; moveli zero, 6"
+  [(set_attr "type" "cannot_bundle")])
+
 \f
 ;;
 ;; Conditional branches