This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 05/10] [ARC] Add trap instruction.
- From: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <Claudiu dot Zissulescu at synopsys dot com>, <Francois dot Bedard at synopsys dot com>, <andrew dot burgess at embecosm dot com>, Claudiu Zissulescu <claziss at gmail dot com>
- Date: Mon, 27 Nov 2017 12:09:54 +0100
- Subject: [PATCH 05/10] [ARC] Add trap instruction.
- Authentication-results: sourceware.org; auth=none
- References: <1511780999-27757-1-git-send-email-claziss@synopsys.com>
From: Claudiu Zissulescu <claziss@gmail.com>
2017-11-07 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (trap): New pattern.
---
gcc/config/arc/arc.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index b8fa44e..42c6a23 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -4321,6 +4321,13 @@ archs4xd, archs4xd_slow, core_3"
; 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)]
""
--
1.9.1