1 ;; Intrinsic patterns description of Andes NDS32 cpu for GNU compiler
2 ;; Copyright (C) 2012-2017 Free Software Foundation, Inc.
3 ;; Contributed by Andes Technology Corporation.
5 ;; This file is part of GCC.
7 ;; GCC is free software; you can redistribute it and/or modify it
8 ;; under the terms of the GNU General Public License as published
9 ;; by the Free Software Foundation; either version 3, or (at your
10 ;; option) any later version.
12 ;; GCC is distributed in the hope that it will be useful, but WITHOUT
13 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 ;; License for more details.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with GCC; see the file COPYING3. If not see
19 ;; <http://www.gnu.org/licenses/>.
21 ;; ------------------------------------------------------------------------
25 (define_insn "unspec_volatile_mfsr"
26 [(set (match_operand:SI 0 "register_operand" "=r")
27 (unspec_volatile:SI [(match_operand:SI 1 "immediate_operand" "i")] UNSPEC_VOLATILE_MFSR))]
30 [(set_attr "type" "misc")
31 (set_attr "length" "4")]
34 (define_insn "unspec_volatile_mfusr"
35 [(set (match_operand:SI 0 "register_operand" "=r")
36 (unspec_volatile:SI [(match_operand:SI 1 "immediate_operand" "i")] UNSPEC_VOLATILE_MFUSR))]
39 [(set_attr "type" "misc")
40 (set_attr "length" "4")]
43 (define_insn "unspec_volatile_mtsr"
44 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
45 (match_operand:SI 1 "immediate_operand" "i")] UNSPEC_VOLATILE_MTSR)]
48 [(set_attr "type" "misc")
49 (set_attr "length" "4")]
52 (define_insn "unspec_volatile_mtusr"
53 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")
54 (match_operand:SI 1 "immediate_operand" "i")] UNSPEC_VOLATILE_MTUSR)]
57 [(set_attr "type" "misc")
58 (set_attr "length" "4")]
61 ;; ------------------------------------------------------------------------
63 ;; Interrupt Instructions.
65 (define_insn "unspec_volatile_setgie_en"
66 [(unspec_volatile:SI [(const_int 0)] UNSPEC_VOLATILE_SETGIE_EN)]
69 [(set_attr "type" "misc")]
72 (define_insn "unspec_volatile_setgie_dis"
73 [(unspec_volatile:SI [(const_int 0)] UNSPEC_VOLATILE_SETGIE_DIS)]
76 [(set_attr "type" "misc")]
79 ;; ------------------------------------------------------------------------
81 ;; Cache Synchronization Instructions
83 (define_insn "unspec_volatile_isync"
84 [(unspec_volatile:SI [(match_operand:SI 0 "register_operand" "r")] UNSPEC_VOLATILE_ISYNC)]
87 [(set_attr "type" "misc")]
90 (define_insn "unspec_volatile_isb"
91 [(unspec_volatile:SI [(const_int 0)] UNSPEC_VOLATILE_ISB)]
94 [(set_attr "type" "misc")]
97 ;; ------------------------------------------------------------------------