[ARC] Add trap instruction.
authorClaudiu Zissulescu <claziss@synopsys.com>
Thu, 30 Nov 2017 14:42:22 +0000 (15:42 +0100)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Thu, 30 Nov 2017 14:42:22 +0000 (15:42 +0100)
2017-11-07  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.md (trap): New pattern.

From-SVN: r255276

gcc/ChangeLog
gcc/config/arc/arc.md

index ae502ca..aee1325 100644 (file)
@@ -1,5 +1,9 @@
 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
 
+       * config/arc/arc.md (trap): New pattern.
+
+2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
+
        * config/arc/arc.c (hwloop_optimize): Prevent the last ZOL
        instruction to end into a delay slot.
        * config/arc/arc.md (cond_delay_insn): Check if the instruction
index b39f047..880327c 100644 (file)
 ; use it for lack of inter-procedural branch shortening.
 ; Link-time relaxation would help...
 
+(define_insn "trap"
+  [(trap_if (const_int 1) (const_int 0))]
+  "!TARGET_ARC600_FAMILY"
+  "trap_s\\t5"
+  [(set_attr "type" "misc")
+   (set_attr "length" "2")])
+
 (define_insn "nop"
   [(const_int 0)]
   ""