[NDS32] Add 'trap' pattern for __builtin_trap ().
authorMonk Chiang <sh.chiang04@gmail.com>
Sun, 10 Feb 2019 09:45:55 +0000 (09:45 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sun, 10 Feb 2019 09:45:55 +0000 (09:45 +0000)
gcc/
* config/nds32/nds32.md (trap): New pattern.

From-SVN: r268741

gcc/ChangeLog
gcc/config/nds32/nds32.md

index 5c415d8b134fdda3f0609a7c6ad24a40fec4cfa0..7b8c81e4d13d5dd6700c730c0904597723652775 100644 (file)
@@ -1,3 +1,7 @@
+2019-02-10  Monk Chiang  <sh.chiang04@gmail.com>
+
+       * config/nds32/nds32.md (trap): New pattern.
+
 2019-02-10  Monk Chiang  <sh.chiang04@gmail.com>
 
        * config/nds32/nds32.c (nds32_dwarf_register_span): Refine register
index 51d92abaf0e7bc391381e72491bf4f43075bb688..cba04c0ba8bfb5e0f2577957739d66175557f9eb 100644 (file)
 
 ;; ----------------------------------------------------------------------------
 
+;; Patterns for __builtin_trap.
+(define_insn "trap"
+  [(trap_if (const_int 1) (const_int 0))]
+  ""
+  "trap\t0")
+
+;; ----------------------------------------------------------------------------
+
 ;; Patterns for TLS.
 ;; The following two tls patterns don't be expanded directly because the
 ;; intermediate value may be spilled into the stack.  As a result, it is