PR tree-optimization/84480 - bogus -Wstringop-truncation despite assignment with...
[official-gcc.git] / gcc / config / nds32 / nds32-intrinsic.md
blob84bcfc51ac6c6651b067a52301ac169bf901ff09
1 ;; Intrinsic patterns description of Andes NDS32 cpu for GNU compiler
2 ;; Copyright (C) 2012-2018 Free Software Foundation, Inc.
3 ;; Contributed by Andes Technology Corporation.
4 ;;
5 ;; This file is part of GCC.
6 ;;
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 ;; ------------------------------------------------------------------------
23 ;; Register Transfer.
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))]
28   ""
29   "mfsr\t%0, %V1"
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))]
37   ""
38   "mfusr\t%0, %V1"
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)]
46   ""
47   "mtsr\t%0, %V1"
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)]
55   ""
56   "mtusr\t%0, %V1"
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)]
67   ""
68   "setgie.e"
69   [(set_attr "type" "misc")]
72 (define_insn "unspec_volatile_setgie_dis"
73   [(unspec_volatile:SI [(const_int 0)] UNSPEC_VOLATILE_SETGIE_DIS)]
74   ""
75   "setgie.d"
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)]
85   ""
86   "isync\t%0"
87   [(set_attr "type" "misc")]
90 (define_insn "unspec_volatile_isb"
91   [(unspec_volatile:SI [(const_int 0)] UNSPEC_VOLATILE_ISB)]
92   ""
93   "isb"
94   [(set_attr "type" "misc")]
97 ;; ------------------------------------------------------------------------