annotate gcc/config/aarch64/iterators.md @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ;; Machine description for AArch64 architecture.
kono
parents:
diff changeset
2 ;; Copyright (C) 2009-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 ;; Contributed by ARM Ltd.
kono
parents:
diff changeset
4 ;;
kono
parents:
diff changeset
5 ;; This file is part of GCC.
kono
parents:
diff changeset
6 ;;
kono
parents:
diff changeset
7 ;; GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 ;; under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 ;; the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
10 ;; any later version.
kono
parents:
diff changeset
11 ;;
kono
parents:
diff changeset
12 ;; GCC is distributed in the hope that it will be useful, but
kono
parents:
diff changeset
13 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
kono
parents:
diff changeset
15 ;; General Public License for more details.
kono
parents:
diff changeset
16 ;;
kono
parents:
diff changeset
17 ;; You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 ;; along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 ;; <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
22 ;; Mode Iterators
kono
parents:
diff changeset
23 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 ;; Iterator for General Purpose Integer registers (32- and 64-bit modes)
kono
parents:
diff changeset
27 (define_mode_iterator GPI [SI DI])
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 ;; Iterator for HI, SI, DI, some instructions can only work on these modes.
kono
parents:
diff changeset
30 (define_mode_iterator GPI_I16 [(HI "AARCH64_ISA_F16") SI DI])
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 ;; Iterator for QI and HI modes
kono
parents:
diff changeset
33 (define_mode_iterator SHORT [QI HI])
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 ;; Iterator for all integer modes (up to 64-bit)
kono
parents:
diff changeset
36 (define_mode_iterator ALLI [QI HI SI DI])
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 ;; Iterator for all integer modes that can be extended (up to 64-bit)
kono
parents:
diff changeset
39 (define_mode_iterator ALLX [QI HI SI])
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 ;; Iterator for General Purpose Floating-point registers (32- and 64-bit modes)
kono
parents:
diff changeset
42 (define_mode_iterator GPF [SF DF])
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 ;; Iterator for all scalar floating point modes (HF, SF, DF)
kono
parents:
diff changeset
45 (define_mode_iterator GPF_F16 [(HF "AARCH64_ISA_F16") SF DF])
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 ;; Iterator for all scalar floating point modes (HF, SF, DF)
kono
parents:
diff changeset
48 (define_mode_iterator GPF_HF [HF SF DF])
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 ;; Iterator for all scalar floating point modes (HF, SF, DF and TF)
kono
parents:
diff changeset
51 (define_mode_iterator GPF_TF_F16 [HF SF DF TF])
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 ;; Double vector modes.
kono
parents:
diff changeset
54 (define_mode_iterator VDF [V2SF V4HF])
kono
parents:
diff changeset
55
kono
parents:
diff changeset
56 ;; Iterator for all scalar floating point modes (SF, DF and TF)
kono
parents:
diff changeset
57 (define_mode_iterator GPF_TF [SF DF TF])
kono
parents:
diff changeset
58
kono
parents:
diff changeset
59 ;; Integer vector modes.
kono
parents:
diff changeset
60 (define_mode_iterator VDQ_I [V8QI V16QI V4HI V8HI V2SI V4SI V2DI])
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 ;; vector and scalar, 64 & 128-bit container, all integer modes
kono
parents:
diff changeset
63 (define_mode_iterator VSDQ_I [V8QI V16QI V4HI V8HI V2SI V4SI V2DI QI HI SI DI])
kono
parents:
diff changeset
64
kono
parents:
diff changeset
65 ;; vector and scalar, 64 & 128-bit container: all vector integer modes;
kono
parents:
diff changeset
66 ;; 64-bit scalar integer mode
kono
parents:
diff changeset
67 (define_mode_iterator VSDQ_I_DI [V8QI V16QI V4HI V8HI V2SI V4SI V2DI DI])
kono
parents:
diff changeset
68
kono
parents:
diff changeset
69 ;; Double vector modes.
kono
parents:
diff changeset
70 (define_mode_iterator VD [V8QI V4HI V4HF V2SI V2SF])
kono
parents:
diff changeset
71
kono
parents:
diff changeset
72 ;; vector, 64-bit container, all integer modes
kono
parents:
diff changeset
73 (define_mode_iterator VD_BHSI [V8QI V4HI V2SI])
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 ;; 128 and 64-bit container; 8, 16, 32-bit vector integer modes
kono
parents:
diff changeset
76 (define_mode_iterator VDQ_BHSI [V8QI V16QI V4HI V8HI V2SI V4SI])
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 ;; Quad vector modes.
kono
parents:
diff changeset
79 (define_mode_iterator VQ [V16QI V8HI V4SI V2DI V8HF V4SF V2DF])
kono
parents:
diff changeset
80
kono
parents:
diff changeset
81 ;; VQ without 2 element modes.
kono
parents:
diff changeset
82 (define_mode_iterator VQ_NO2E [V16QI V8HI V4SI V8HF V4SF])
kono
parents:
diff changeset
83
kono
parents:
diff changeset
84 ;; Quad vector with only 2 element modes.
kono
parents:
diff changeset
85 (define_mode_iterator VQ_2E [V2DI V2DF])
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 ;; This mode iterator allows :P to be used for patterns that operate on
kono
parents:
diff changeset
88 ;; addresses in different modes. In LP64, only DI will match, while in
kono
parents:
diff changeset
89 ;; ILP32, either can match.
kono
parents:
diff changeset
90 (define_mode_iterator P [(SI "ptr_mode == SImode || Pmode == SImode")
kono
parents:
diff changeset
91 (DI "ptr_mode == DImode || Pmode == DImode")])
kono
parents:
diff changeset
92
kono
parents:
diff changeset
93 ;; This mode iterator allows :PTR to be used for patterns that operate on
kono
parents:
diff changeset
94 ;; pointer-sized quantities. Exactly one of the two alternatives will match.
kono
parents:
diff changeset
95 (define_mode_iterator PTR [(SI "ptr_mode == SImode") (DI "ptr_mode == DImode")])
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 ;; Vector Float modes suitable for moving, loading and storing.
kono
parents:
diff changeset
98 (define_mode_iterator VDQF_F16 [V4HF V8HF V2SF V4SF V2DF])
kono
parents:
diff changeset
99
kono
parents:
diff changeset
100 ;; Vector Float modes.
kono
parents:
diff changeset
101 (define_mode_iterator VDQF [V2SF V4SF V2DF])
kono
parents:
diff changeset
102 (define_mode_iterator VHSDF [(V4HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
103 (V8HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
104 V2SF V4SF V2DF])
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 ;; Vector Float modes, and DF.
kono
parents:
diff changeset
107 (define_mode_iterator VHSDF_DF [(V4HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
108 (V8HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
109 V2SF V4SF V2DF DF])
kono
parents:
diff changeset
110 (define_mode_iterator VHSDF_HSDF [(V4HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
111 (V8HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
112 V2SF V4SF V2DF
kono
parents:
diff changeset
113 (HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
114 SF DF])
kono
parents:
diff changeset
115
kono
parents:
diff changeset
116 ;; Vector single Float modes.
kono
parents:
diff changeset
117 (define_mode_iterator VDQSF [V2SF V4SF])
kono
parents:
diff changeset
118
kono
parents:
diff changeset
119 ;; Quad vector Float modes with half/single elements.
kono
parents:
diff changeset
120 (define_mode_iterator VQ_HSF [V8HF V4SF])
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 ;; Modes suitable to use as the return type of a vcond expression.
kono
parents:
diff changeset
123 (define_mode_iterator VDQF_COND [V2SF V2SI V4SF V4SI V2DF V2DI])
kono
parents:
diff changeset
124
kono
parents:
diff changeset
125 ;; All Float modes.
kono
parents:
diff changeset
126 (define_mode_iterator VALLF [V2SF V4SF V2DF SF DF])
kono
parents:
diff changeset
127
kono
parents:
diff changeset
128 ;; Vector Float modes with 2 elements.
kono
parents:
diff changeset
129 (define_mode_iterator V2F [V2SF V2DF])
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 ;; All vector modes on which we support any arithmetic operations.
kono
parents:
diff changeset
132 (define_mode_iterator VALL [V8QI V16QI V4HI V8HI V2SI V4SI V2DI V2SF V4SF V2DF])
kono
parents:
diff changeset
133
kono
parents:
diff changeset
134 ;; All vector modes suitable for moving, loading, and storing.
kono
parents:
diff changeset
135 (define_mode_iterator VALL_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI
kono
parents:
diff changeset
136 V4HF V8HF V2SF V4SF V2DF])
kono
parents:
diff changeset
137
kono
parents:
diff changeset
138 ;; The VALL_F16 modes except the 128-bit 2-element ones.
kono
parents:
diff changeset
139 (define_mode_iterator VALL_F16_NO_V2Q [V8QI V16QI V4HI V8HI V2SI V4SI
kono
parents:
diff changeset
140 V4HF V8HF V2SF V4SF])
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 ;; All vector modes barring HF modes, plus DI.
kono
parents:
diff changeset
143 (define_mode_iterator VALLDI [V8QI V16QI V4HI V8HI V2SI V4SI V2DI V2SF V4SF V2DF DI])
kono
parents:
diff changeset
144
kono
parents:
diff changeset
145 ;; All vector modes and DI.
kono
parents:
diff changeset
146 (define_mode_iterator VALLDI_F16 [V8QI V16QI V4HI V8HI V2SI V4SI V2DI
kono
parents:
diff changeset
147 V4HF V8HF V2SF V4SF V2DF DI])
kono
parents:
diff changeset
148
kono
parents:
diff changeset
149 ;; All vector modes, plus DI and DF.
kono
parents:
diff changeset
150 (define_mode_iterator VALLDIF [V8QI V16QI V4HI V8HI V2SI V4SI
kono
parents:
diff changeset
151 V2DI V4HF V8HF V2SF V4SF V2DF DI DF])
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 ;; Vector modes for Integer reduction across lanes.
kono
parents:
diff changeset
154 (define_mode_iterator VDQV [V8QI V16QI V4HI V8HI V4SI V2DI])
kono
parents:
diff changeset
155
kono
parents:
diff changeset
156 ;; Vector modes(except V2DI) for Integer reduction across lanes.
kono
parents:
diff changeset
157 (define_mode_iterator VDQV_S [V8QI V16QI V4HI V8HI V4SI])
kono
parents:
diff changeset
158
kono
parents:
diff changeset
159 ;; All double integer narrow-able modes.
kono
parents:
diff changeset
160 (define_mode_iterator VDN [V4HI V2SI DI])
kono
parents:
diff changeset
161
kono
parents:
diff changeset
162 ;; All quad integer narrow-able modes.
kono
parents:
diff changeset
163 (define_mode_iterator VQN [V8HI V4SI V2DI])
kono
parents:
diff changeset
164
kono
parents:
diff changeset
165 ;; Vector and scalar 128-bit container: narrowable 16, 32, 64-bit integer modes
kono
parents:
diff changeset
166 (define_mode_iterator VSQN_HSDI [V8HI V4SI V2DI HI SI DI])
kono
parents:
diff changeset
167
kono
parents:
diff changeset
168 ;; All quad integer widen-able modes.
kono
parents:
diff changeset
169 (define_mode_iterator VQW [V16QI V8HI V4SI])
kono
parents:
diff changeset
170
kono
parents:
diff changeset
171 ;; Double vector modes for combines.
kono
parents:
diff changeset
172 (define_mode_iterator VDC [V8QI V4HI V4HF V2SI V2SF DI DF])
kono
parents:
diff changeset
173
kono
parents:
diff changeset
174 ;; Vector modes except double int.
kono
parents:
diff changeset
175 (define_mode_iterator VDQIF [V8QI V16QI V4HI V8HI V2SI V4SI V2SF V4SF V2DF])
kono
parents:
diff changeset
176 (define_mode_iterator VDQIF_F16 [V8QI V16QI V4HI V8HI V2SI V4SI
kono
parents:
diff changeset
177 V4HF V8HF V2SF V4SF V2DF])
kono
parents:
diff changeset
178
kono
parents:
diff changeset
179 ;; Vector modes for S type.
kono
parents:
diff changeset
180 (define_mode_iterator VDQ_SI [V2SI V4SI])
kono
parents:
diff changeset
181
kono
parents:
diff changeset
182 ;; Vector modes for S and D
kono
parents:
diff changeset
183 (define_mode_iterator VDQ_SDI [V2SI V4SI V2DI])
kono
parents:
diff changeset
184
kono
parents:
diff changeset
185 ;; Vector modes for H, S and D
kono
parents:
diff changeset
186 (define_mode_iterator VDQ_HSDI [(V4HI "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
187 (V8HI "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
188 V2SI V4SI V2DI])
kono
parents:
diff changeset
189
kono
parents:
diff changeset
190 ;; Scalar and Vector modes for S and D
kono
parents:
diff changeset
191 (define_mode_iterator VSDQ_SDI [V2SI V4SI V2DI SI DI])
kono
parents:
diff changeset
192
kono
parents:
diff changeset
193 ;; Scalar and Vector modes for S and D, Vector modes for H.
kono
parents:
diff changeset
194 (define_mode_iterator VSDQ_HSDI [(V4HI "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
195 (V8HI "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
196 V2SI V4SI V2DI
kono
parents:
diff changeset
197 (HI "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
198 SI DI])
kono
parents:
diff changeset
199
kono
parents:
diff changeset
200 ;; Vector modes for Q and H types.
kono
parents:
diff changeset
201 (define_mode_iterator VDQQH [V8QI V16QI V4HI V8HI])
kono
parents:
diff changeset
202
kono
parents:
diff changeset
203 ;; Vector modes for H and S types.
kono
parents:
diff changeset
204 (define_mode_iterator VDQHS [V4HI V8HI V2SI V4SI])
kono
parents:
diff changeset
205
kono
parents:
diff changeset
206 ;; Vector modes for H, S and D types.
kono
parents:
diff changeset
207 (define_mode_iterator VDQHSD [V4HI V8HI V2SI V4SI V2DI])
kono
parents:
diff changeset
208
kono
parents:
diff changeset
209 ;; Vector and scalar integer modes for H and S
kono
parents:
diff changeset
210 (define_mode_iterator VSDQ_HSI [V4HI V8HI V2SI V4SI HI SI])
kono
parents:
diff changeset
211
kono
parents:
diff changeset
212 ;; Vector and scalar 64-bit container: 16, 32-bit integer modes
kono
parents:
diff changeset
213 (define_mode_iterator VSD_HSI [V4HI V2SI HI SI])
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 ;; Vector 64-bit container: 16, 32-bit integer modes
kono
parents:
diff changeset
216 (define_mode_iterator VD_HSI [V4HI V2SI])
kono
parents:
diff changeset
217
kono
parents:
diff changeset
218 ;; Scalar 64-bit container: 16, 32-bit integer modes
kono
parents:
diff changeset
219 (define_mode_iterator SD_HSI [HI SI])
kono
parents:
diff changeset
220
kono
parents:
diff changeset
221 ;; Vector 64-bit container: 16, 32-bit integer modes
kono
parents:
diff changeset
222 (define_mode_iterator VQ_HSI [V8HI V4SI])
kono
parents:
diff changeset
223
kono
parents:
diff changeset
224 ;; All byte modes.
kono
parents:
diff changeset
225 (define_mode_iterator VB [V8QI V16QI])
kono
parents:
diff changeset
226
kono
parents:
diff changeset
227 ;; 2 and 4 lane SI modes.
kono
parents:
diff changeset
228 (define_mode_iterator VS [V2SI V4SI])
kono
parents:
diff changeset
229
kono
parents:
diff changeset
230 (define_mode_iterator TX [TI TF])
kono
parents:
diff changeset
231
kono
parents:
diff changeset
232 ;; Opaque structure modes.
kono
parents:
diff changeset
233 (define_mode_iterator VSTRUCT [OI CI XI])
kono
parents:
diff changeset
234
kono
parents:
diff changeset
235 ;; Double scalar modes
kono
parents:
diff changeset
236 (define_mode_iterator DX [DI DF])
kono
parents:
diff changeset
237
kono
parents:
diff changeset
238 ;; Modes available for <f>mul lane operations.
kono
parents:
diff changeset
239 (define_mode_iterator VMUL [V4HI V8HI V2SI V4SI
kono
parents:
diff changeset
240 (V4HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
241 (V8HF "TARGET_SIMD_F16INST")
kono
parents:
diff changeset
242 V2SF V4SF V2DF])
kono
parents:
diff changeset
243
kono
parents:
diff changeset
244 ;; Modes available for <f>mul lane operations changing lane count.
kono
parents:
diff changeset
245 (define_mode_iterator VMUL_CHANGE_NLANES [V4HI V8HI V2SI V4SI V2SF V4SF])
kono
parents:
diff changeset
246
kono
parents:
diff changeset
247 ;; ------------------------------------------------------------------
kono
parents:
diff changeset
248 ;; Unspec enumerations for Advance SIMD. These could well go into
kono
parents:
diff changeset
249 ;; aarch64.md but for their use in int_iterators here.
kono
parents:
diff changeset
250 ;; ------------------------------------------------------------------
kono
parents:
diff changeset
251
kono
parents:
diff changeset
252 (define_c_enum "unspec"
kono
parents:
diff changeset
253 [
kono
parents:
diff changeset
254 UNSPEC_ASHIFT_SIGNED ; Used in aarch-simd.md.
kono
parents:
diff changeset
255 UNSPEC_ASHIFT_UNSIGNED ; Used in aarch64-simd.md.
kono
parents:
diff changeset
256 UNSPEC_ABS ; Used in aarch64-simd.md.
kono
parents:
diff changeset
257 UNSPEC_FMAX ; Used in aarch64-simd.md.
kono
parents:
diff changeset
258 UNSPEC_FMAXNMV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
259 UNSPEC_FMAXV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
260 UNSPEC_FMIN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
261 UNSPEC_FMINNMV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
262 UNSPEC_FMINV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
263 UNSPEC_FADDV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
264 UNSPEC_ADDV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
265 UNSPEC_SMAXV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
266 UNSPEC_SMINV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
267 UNSPEC_UMAXV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
268 UNSPEC_UMINV ; Used in aarch64-simd.md.
kono
parents:
diff changeset
269 UNSPEC_SHADD ; Used in aarch64-simd.md.
kono
parents:
diff changeset
270 UNSPEC_UHADD ; Used in aarch64-simd.md.
kono
parents:
diff changeset
271 UNSPEC_SRHADD ; Used in aarch64-simd.md.
kono
parents:
diff changeset
272 UNSPEC_URHADD ; Used in aarch64-simd.md.
kono
parents:
diff changeset
273 UNSPEC_SHSUB ; Used in aarch64-simd.md.
kono
parents:
diff changeset
274 UNSPEC_UHSUB ; Used in aarch64-simd.md.
kono
parents:
diff changeset
275 UNSPEC_SRHSUB ; Used in aarch64-simd.md.
kono
parents:
diff changeset
276 UNSPEC_URHSUB ; Used in aarch64-simd.md.
kono
parents:
diff changeset
277 UNSPEC_ADDHN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
278 UNSPEC_RADDHN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
279 UNSPEC_SUBHN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
280 UNSPEC_RSUBHN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
281 UNSPEC_ADDHN2 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
282 UNSPEC_RADDHN2 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
283 UNSPEC_SUBHN2 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
284 UNSPEC_RSUBHN2 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
285 UNSPEC_SQDMULH ; Used in aarch64-simd.md.
kono
parents:
diff changeset
286 UNSPEC_SQRDMULH ; Used in aarch64-simd.md.
kono
parents:
diff changeset
287 UNSPEC_PMUL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
288 UNSPEC_FMULX ; Used in aarch64-simd.md.
kono
parents:
diff changeset
289 UNSPEC_USQADD ; Used in aarch64-simd.md.
kono
parents:
diff changeset
290 UNSPEC_SUQADD ; Used in aarch64-simd.md.
kono
parents:
diff changeset
291 UNSPEC_SQXTUN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
292 UNSPEC_SQXTN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
293 UNSPEC_UQXTN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
294 UNSPEC_SSRA ; Used in aarch64-simd.md.
kono
parents:
diff changeset
295 UNSPEC_USRA ; Used in aarch64-simd.md.
kono
parents:
diff changeset
296 UNSPEC_SRSRA ; Used in aarch64-simd.md.
kono
parents:
diff changeset
297 UNSPEC_URSRA ; Used in aarch64-simd.md.
kono
parents:
diff changeset
298 UNSPEC_SRSHR ; Used in aarch64-simd.md.
kono
parents:
diff changeset
299 UNSPEC_URSHR ; Used in aarch64-simd.md.
kono
parents:
diff changeset
300 UNSPEC_SQSHLU ; Used in aarch64-simd.md.
kono
parents:
diff changeset
301 UNSPEC_SQSHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
302 UNSPEC_UQSHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
303 UNSPEC_SQSHRUN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
304 UNSPEC_SQRSHRUN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
305 UNSPEC_SQSHRN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
306 UNSPEC_UQSHRN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
307 UNSPEC_SQRSHRN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
308 UNSPEC_UQRSHRN ; Used in aarch64-simd.md.
kono
parents:
diff changeset
309 UNSPEC_SSHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
310 UNSPEC_USHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
311 UNSPEC_SRSHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
312 UNSPEC_URSHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
313 UNSPEC_SQRSHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
314 UNSPEC_UQRSHL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
315 UNSPEC_SSLI ; Used in aarch64-simd.md.
kono
parents:
diff changeset
316 UNSPEC_USLI ; Used in aarch64-simd.md.
kono
parents:
diff changeset
317 UNSPEC_SSRI ; Used in aarch64-simd.md.
kono
parents:
diff changeset
318 UNSPEC_USRI ; Used in aarch64-simd.md.
kono
parents:
diff changeset
319 UNSPEC_SSHLL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
320 UNSPEC_USHLL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
321 UNSPEC_ADDP ; Used in aarch64-simd.md.
kono
parents:
diff changeset
322 UNSPEC_TBL ; Used in vector permute patterns.
kono
parents:
diff changeset
323 UNSPEC_TBX ; Used in vector permute patterns.
kono
parents:
diff changeset
324 UNSPEC_CONCAT ; Used in vector permute patterns.
kono
parents:
diff changeset
325 UNSPEC_ZIP1 ; Used in vector permute patterns.
kono
parents:
diff changeset
326 UNSPEC_ZIP2 ; Used in vector permute patterns.
kono
parents:
diff changeset
327 UNSPEC_UZP1 ; Used in vector permute patterns.
kono
parents:
diff changeset
328 UNSPEC_UZP2 ; Used in vector permute patterns.
kono
parents:
diff changeset
329 UNSPEC_TRN1 ; Used in vector permute patterns.
kono
parents:
diff changeset
330 UNSPEC_TRN2 ; Used in vector permute patterns.
kono
parents:
diff changeset
331 UNSPEC_EXT ; Used in aarch64-simd.md.
kono
parents:
diff changeset
332 UNSPEC_REV64 ; Used in vector reverse patterns (permute).
kono
parents:
diff changeset
333 UNSPEC_REV32 ; Used in vector reverse patterns (permute).
kono
parents:
diff changeset
334 UNSPEC_REV16 ; Used in vector reverse patterns (permute).
kono
parents:
diff changeset
335 UNSPEC_AESE ; Used in aarch64-simd.md.
kono
parents:
diff changeset
336 UNSPEC_AESD ; Used in aarch64-simd.md.
kono
parents:
diff changeset
337 UNSPEC_AESMC ; Used in aarch64-simd.md.
kono
parents:
diff changeset
338 UNSPEC_AESIMC ; Used in aarch64-simd.md.
kono
parents:
diff changeset
339 UNSPEC_SHA1C ; Used in aarch64-simd.md.
kono
parents:
diff changeset
340 UNSPEC_SHA1M ; Used in aarch64-simd.md.
kono
parents:
diff changeset
341 UNSPEC_SHA1P ; Used in aarch64-simd.md.
kono
parents:
diff changeset
342 UNSPEC_SHA1H ; Used in aarch64-simd.md.
kono
parents:
diff changeset
343 UNSPEC_SHA1SU0 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
344 UNSPEC_SHA1SU1 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
345 UNSPEC_SHA256H ; Used in aarch64-simd.md.
kono
parents:
diff changeset
346 UNSPEC_SHA256H2 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
347 UNSPEC_SHA256SU0 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
348 UNSPEC_SHA256SU1 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
349 UNSPEC_PMULL ; Used in aarch64-simd.md.
kono
parents:
diff changeset
350 UNSPEC_PMULL2 ; Used in aarch64-simd.md.
kono
parents:
diff changeset
351 UNSPEC_REV_REGLIST ; Used in aarch64-simd.md.
kono
parents:
diff changeset
352 UNSPEC_VEC_SHR ; Used in aarch64-simd.md.
kono
parents:
diff changeset
353 UNSPEC_SQRDMLAH ; Used in aarch64-simd.md.
kono
parents:
diff changeset
354 UNSPEC_SQRDMLSH ; Used in aarch64-simd.md.
kono
parents:
diff changeset
355 UNSPEC_FMAXNM ; Used in aarch64-simd.md.
kono
parents:
diff changeset
356 UNSPEC_FMINNM ; Used in aarch64-simd.md.
kono
parents:
diff changeset
357 UNSPEC_SDOT ; Used in aarch64-simd.md.
kono
parents:
diff changeset
358 UNSPEC_UDOT ; Used in aarch64-simd.md.
kono
parents:
diff changeset
359 ])
kono
parents:
diff changeset
360
kono
parents:
diff changeset
361 ;; ------------------------------------------------------------------
kono
parents:
diff changeset
362 ;; Unspec enumerations for Atomics. They are here so that they can be
kono
parents:
diff changeset
363 ;; used in the int_iterators for atomic operations.
kono
parents:
diff changeset
364 ;; ------------------------------------------------------------------
kono
parents:
diff changeset
365
kono
parents:
diff changeset
366 (define_c_enum "unspecv"
kono
parents:
diff changeset
367 [
kono
parents:
diff changeset
368 UNSPECV_LX ; Represent a load-exclusive.
kono
parents:
diff changeset
369 UNSPECV_SX ; Represent a store-exclusive.
kono
parents:
diff changeset
370 UNSPECV_LDA ; Represent an atomic load or load-acquire.
kono
parents:
diff changeset
371 UNSPECV_STL ; Represent an atomic store or store-release.
kono
parents:
diff changeset
372 UNSPECV_ATOMIC_CMPSW ; Represent an atomic compare swap.
kono
parents:
diff changeset
373 UNSPECV_ATOMIC_EXCHG ; Represent an atomic exchange.
kono
parents:
diff changeset
374 UNSPECV_ATOMIC_CAS ; Represent an atomic CAS.
kono
parents:
diff changeset
375 UNSPECV_ATOMIC_SWP ; Represent an atomic SWP.
kono
parents:
diff changeset
376 UNSPECV_ATOMIC_OP ; Represent an atomic operation.
kono
parents:
diff changeset
377 UNSPECV_ATOMIC_LDOP ; Represent an atomic load-operation
kono
parents:
diff changeset
378 UNSPECV_ATOMIC_LDOP_OR ; Represent an atomic load-or
kono
parents:
diff changeset
379 UNSPECV_ATOMIC_LDOP_BIC ; Represent an atomic load-bic
kono
parents:
diff changeset
380 UNSPECV_ATOMIC_LDOP_XOR ; Represent an atomic load-xor
kono
parents:
diff changeset
381 UNSPECV_ATOMIC_LDOP_PLUS ; Represent an atomic load-add
kono
parents:
diff changeset
382 ])
kono
parents:
diff changeset
383
kono
parents:
diff changeset
384 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
385 ;; Mode attributes
kono
parents:
diff changeset
386 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
387
kono
parents:
diff changeset
388 ;; In GPI templates, a string like "%<w>0" will expand to "%w0" in the
kono
parents:
diff changeset
389 ;; 32-bit version and "%x0" in the 64-bit version.
kono
parents:
diff changeset
390 (define_mode_attr w [(QI "w") (HI "w") (SI "w") (DI "x") (SF "s") (DF "d")])
kono
parents:
diff changeset
391
kono
parents:
diff changeset
392 ;; The size of access, in bytes.
kono
parents:
diff changeset
393 (define_mode_attr ldst_sz [(SI "4") (DI "8")])
kono
parents:
diff changeset
394 ;; Likewise for load/store pair.
kono
parents:
diff changeset
395 (define_mode_attr ldpstp_sz [(SI "8") (DI "16")])
kono
parents:
diff changeset
396
kono
parents:
diff changeset
397 ;; For inequal width int to float conversion
kono
parents:
diff changeset
398 (define_mode_attr w1 [(HF "w") (SF "w") (DF "x")])
kono
parents:
diff changeset
399 (define_mode_attr w2 [(HF "x") (SF "x") (DF "w")])
kono
parents:
diff changeset
400
kono
parents:
diff changeset
401 (define_mode_attr short_mask [(HI "65535") (QI "255")])
kono
parents:
diff changeset
402
kono
parents:
diff changeset
403 ;; For constraints used in scalar immediate vector moves
kono
parents:
diff changeset
404 (define_mode_attr hq [(HI "h") (QI "q")])
kono
parents:
diff changeset
405
kono
parents:
diff changeset
406 ;; For doubling width of an integer mode
kono
parents:
diff changeset
407 (define_mode_attr DWI [(QI "HI") (HI "SI") (SI "DI") (DI "TI")])
kono
parents:
diff changeset
408
kono
parents:
diff changeset
409 ;; For scalar usage of vector/FP registers
kono
parents:
diff changeset
410 (define_mode_attr v [(QI "b") (HI "h") (SI "s") (DI "d")
kono
parents:
diff changeset
411 (HF "h") (SF "s") (DF "d")
kono
parents:
diff changeset
412 (V8QI "") (V16QI "")
kono
parents:
diff changeset
413 (V4HI "") (V8HI "")
kono
parents:
diff changeset
414 (V2SI "") (V4SI "")
kono
parents:
diff changeset
415 (V2DI "") (V2SF "")
kono
parents:
diff changeset
416 (V4SF "") (V4HF "")
kono
parents:
diff changeset
417 (V8HF "") (V2DF "")])
kono
parents:
diff changeset
418
kono
parents:
diff changeset
419 ;; For scalar usage of vector/FP registers, narrowing
kono
parents:
diff changeset
420 (define_mode_attr vn2 [(QI "") (HI "b") (SI "h") (DI "s")
kono
parents:
diff changeset
421 (V8QI "") (V16QI "")
kono
parents:
diff changeset
422 (V4HI "") (V8HI "")
kono
parents:
diff changeset
423 (V2SI "") (V4SI "")
kono
parents:
diff changeset
424 (V2DI "") (V2SF "")
kono
parents:
diff changeset
425 (V4SF "") (V2DF "")])
kono
parents:
diff changeset
426
kono
parents:
diff changeset
427 ;; For scalar usage of vector/FP registers, widening
kono
parents:
diff changeset
428 (define_mode_attr vw2 [(DI "") (QI "h") (HI "s") (SI "d")
kono
parents:
diff changeset
429 (V8QI "") (V16QI "")
kono
parents:
diff changeset
430 (V4HI "") (V8HI "")
kono
parents:
diff changeset
431 (V2SI "") (V4SI "")
kono
parents:
diff changeset
432 (V2DI "") (V2SF "")
kono
parents:
diff changeset
433 (V4SF "") (V2DF "")])
kono
parents:
diff changeset
434
kono
parents:
diff changeset
435 ;; Register Type Name and Vector Arrangement Specifier for when
kono
parents:
diff changeset
436 ;; we are doing scalar for DI and SIMD for SI (ignoring all but
kono
parents:
diff changeset
437 ;; lane 0).
kono
parents:
diff changeset
438 (define_mode_attr rtn [(DI "d") (SI "")])
kono
parents:
diff changeset
439 (define_mode_attr vas [(DI "") (SI ".2s")])
kono
parents:
diff changeset
440
kono
parents:
diff changeset
441 ;; Map a floating point mode to the appropriate register name prefix
kono
parents:
diff changeset
442 (define_mode_attr s [(HF "h") (SF "s") (DF "d")])
kono
parents:
diff changeset
443
kono
parents:
diff changeset
444 ;; Give the length suffix letter for a sign- or zero-extension.
kono
parents:
diff changeset
445 (define_mode_attr size [(QI "b") (HI "h") (SI "w")])
kono
parents:
diff changeset
446
kono
parents:
diff changeset
447 ;; Give the number of bits in the mode
kono
parents:
diff changeset
448 (define_mode_attr sizen [(QI "8") (HI "16") (SI "32") (DI "64")])
kono
parents:
diff changeset
449
kono
parents:
diff changeset
450 ;; Give the ordinal of the MSB in the mode
kono
parents:
diff changeset
451 (define_mode_attr sizem1 [(QI "#7") (HI "#15") (SI "#31") (DI "#63")])
kono
parents:
diff changeset
452
kono
parents:
diff changeset
453 ;; Attribute to describe constants acceptable in logical operations
kono
parents:
diff changeset
454 (define_mode_attr lconst [(SI "K") (DI "L")])
kono
parents:
diff changeset
455
kono
parents:
diff changeset
456 ;; Attribute to describe constants acceptable in logical and operations
kono
parents:
diff changeset
457 (define_mode_attr lconst2 [(SI "UsO") (DI "UsP")])
kono
parents:
diff changeset
458
kono
parents:
diff changeset
459 ;; Map a mode to a specific constraint character.
kono
parents:
diff changeset
460 (define_mode_attr cmode [(QI "q") (HI "h") (SI "s") (DI "d")])
kono
parents:
diff changeset
461
kono
parents:
diff changeset
462 (define_mode_attr Vtype [(V8QI "8b") (V16QI "16b")
kono
parents:
diff changeset
463 (V4HI "4h") (V8HI "8h")
kono
parents:
diff changeset
464 (V2SI "2s") (V4SI "4s")
kono
parents:
diff changeset
465 (DI "1d") (DF "1d")
kono
parents:
diff changeset
466 (V2DI "2d") (V2SF "2s")
kono
parents:
diff changeset
467 (V4SF "4s") (V2DF "2d")
kono
parents:
diff changeset
468 (V4HF "4h") (V8HF "8h")])
kono
parents:
diff changeset
469
kono
parents:
diff changeset
470 (define_mode_attr Vrevsuff [(V4HI "16") (V8HI "16") (V2SI "32")
kono
parents:
diff changeset
471 (V4SI "32") (V2DI "64")])
kono
parents:
diff changeset
472
kono
parents:
diff changeset
473 (define_mode_attr Vmtype [(V8QI ".8b") (V16QI ".16b")
kono
parents:
diff changeset
474 (V4HI ".4h") (V8HI ".8h")
kono
parents:
diff changeset
475 (V2SI ".2s") (V4SI ".4s")
kono
parents:
diff changeset
476 (V2DI ".2d") (V4HF ".4h")
kono
parents:
diff changeset
477 (V8HF ".8h") (V2SF ".2s")
kono
parents:
diff changeset
478 (V4SF ".4s") (V2DF ".2d")
kono
parents:
diff changeset
479 (DI "") (SI "")
kono
parents:
diff changeset
480 (HI "") (QI "")
kono
parents:
diff changeset
481 (TI "") (HF "")
kono
parents:
diff changeset
482 (SF "") (DF "")])
kono
parents:
diff changeset
483
kono
parents:
diff changeset
484 ;; Register suffix narrowed modes for VQN.
kono
parents:
diff changeset
485 (define_mode_attr Vmntype [(V8HI ".8b") (V4SI ".4h")
kono
parents:
diff changeset
486 (V2DI ".2s")
kono
parents:
diff changeset
487 (DI "") (SI "")
kono
parents:
diff changeset
488 (HI "")])
kono
parents:
diff changeset
489
kono
parents:
diff changeset
490 ;; Mode-to-individual element type mapping.
kono
parents:
diff changeset
491 (define_mode_attr Vetype [(V8QI "b") (V16QI "b")
kono
parents:
diff changeset
492 (V4HI "h") (V8HI "h")
kono
parents:
diff changeset
493 (V2SI "s") (V4SI "s")
kono
parents:
diff changeset
494 (V2DI "d") (V4HF "h")
kono
parents:
diff changeset
495 (V8HF "h") (V2SF "s")
kono
parents:
diff changeset
496 (V4SF "s") (V2DF "d")
kono
parents:
diff changeset
497 (HF "h")
kono
parents:
diff changeset
498 (SF "s") (DF "d")
kono
parents:
diff changeset
499 (QI "b") (HI "h")
kono
parents:
diff changeset
500 (SI "s") (DI "d")])
kono
parents:
diff changeset
501
kono
parents:
diff changeset
502 ;; Vetype is used everywhere in scheduling type and assembly output,
kono
parents:
diff changeset
503 ;; sometimes they are not the same, for example HF modes on some
kono
parents:
diff changeset
504 ;; instructions. stype is defined to represent scheduling type
kono
parents:
diff changeset
505 ;; more accurately.
kono
parents:
diff changeset
506 (define_mode_attr stype [(V8QI "b") (V16QI "b") (V4HI "s") (V8HI "s")
kono
parents:
diff changeset
507 (V2SI "s") (V4SI "s") (V2DI "d") (V4HF "s")
kono
parents:
diff changeset
508 (V8HF "s") (V2SF "s") (V4SF "s") (V2DF "d")
kono
parents:
diff changeset
509 (HF "s") (SF "s") (DF "d") (QI "b") (HI "s")
kono
parents:
diff changeset
510 (SI "s") (DI "d")])
kono
parents:
diff changeset
511
kono
parents:
diff changeset
512 ;; Mode-to-bitwise operation type mapping.
kono
parents:
diff changeset
513 (define_mode_attr Vbtype [(V8QI "8b") (V16QI "16b")
kono
parents:
diff changeset
514 (V4HI "8b") (V8HI "16b")
kono
parents:
diff changeset
515 (V2SI "8b") (V4SI "16b")
kono
parents:
diff changeset
516 (V2DI "16b") (V4HF "8b")
kono
parents:
diff changeset
517 (V8HF "16b") (V2SF "8b")
kono
parents:
diff changeset
518 (V4SF "16b") (V2DF "16b")
kono
parents:
diff changeset
519 (DI "8b") (DF "8b")
kono
parents:
diff changeset
520 (SI "8b")])
kono
parents:
diff changeset
521
kono
parents:
diff changeset
522 ;; Define element mode for each vector mode.
kono
parents:
diff changeset
523 (define_mode_attr VEL [(V8QI "QI") (V16QI "QI")
kono
parents:
diff changeset
524 (V4HI "HI") (V8HI "HI")
kono
parents:
diff changeset
525 (V2SI "SI") (V4SI "SI")
kono
parents:
diff changeset
526 (DI "DI") (V2DI "DI")
kono
parents:
diff changeset
527 (V4HF "HF") (V8HF "HF")
kono
parents:
diff changeset
528 (V2SF "SF") (V4SF "SF")
kono
parents:
diff changeset
529 (V2DF "DF") (DF "DF")
kono
parents:
diff changeset
530 (SI "SI") (HI "HI")
kono
parents:
diff changeset
531 (QI "QI")])
kono
parents:
diff changeset
532
kono
parents:
diff changeset
533 ;; Define element mode for each vector mode (lower case).
kono
parents:
diff changeset
534 (define_mode_attr Vel [(V8QI "qi") (V16QI "qi")
kono
parents:
diff changeset
535 (V4HI "hi") (V8HI "hi")
kono
parents:
diff changeset
536 (V2SI "si") (V4SI "si")
kono
parents:
diff changeset
537 (DI "di") (V2DI "di")
kono
parents:
diff changeset
538 (V4HF "hf") (V8HF "hf")
kono
parents:
diff changeset
539 (V2SF "sf") (V4SF "sf")
kono
parents:
diff changeset
540 (V2DF "df") (DF "df")
kono
parents:
diff changeset
541 (SI "si") (HI "hi")
kono
parents:
diff changeset
542 (QI "qi")])
kono
parents:
diff changeset
543
kono
parents:
diff changeset
544 ;; 64-bit container modes the inner or scalar source mode.
kono
parents:
diff changeset
545 (define_mode_attr VCOND [(HI "V4HI") (SI "V2SI")
kono
parents:
diff changeset
546 (V4HI "V4HI") (V8HI "V4HI")
kono
parents:
diff changeset
547 (V2SI "V2SI") (V4SI "V2SI")
kono
parents:
diff changeset
548 (DI "DI") (V2DI "DI")
kono
parents:
diff changeset
549 (V2SF "V2SF") (V4SF "V2SF")
kono
parents:
diff changeset
550 (V2DF "DF")])
kono
parents:
diff changeset
551
kono
parents:
diff changeset
552 ;; 128-bit container modes the inner or scalar source mode.
kono
parents:
diff changeset
553 (define_mode_attr VCONQ [(V8QI "V16QI") (V16QI "V16QI")
kono
parents:
diff changeset
554 (V4HI "V8HI") (V8HI "V8HI")
kono
parents:
diff changeset
555 (V2SI "V4SI") (V4SI "V4SI")
kono
parents:
diff changeset
556 (DI "V2DI") (V2DI "V2DI")
kono
parents:
diff changeset
557 (V4HF "V8HF") (V8HF "V8HF")
kono
parents:
diff changeset
558 (V2SF "V2SF") (V4SF "V4SF")
kono
parents:
diff changeset
559 (V2DF "V2DF") (SI "V4SI")
kono
parents:
diff changeset
560 (HI "V8HI") (QI "V16QI")])
kono
parents:
diff changeset
561
kono
parents:
diff changeset
562 ;; Half modes of all vector modes.
kono
parents:
diff changeset
563 (define_mode_attr VHALF [(V8QI "V4QI") (V16QI "V8QI")
kono
parents:
diff changeset
564 (V4HI "V2HI") (V8HI "V4HI")
kono
parents:
diff changeset
565 (V2SI "SI") (V4SI "V2SI")
kono
parents:
diff changeset
566 (V2DI "DI") (V2SF "SF")
kono
parents:
diff changeset
567 (V4SF "V2SF") (V4HF "V2HF")
kono
parents:
diff changeset
568 (V8HF "V4HF") (V2DF "DF")])
kono
parents:
diff changeset
569
kono
parents:
diff changeset
570 ;; Half modes of all vector modes, in lower-case.
kono
parents:
diff changeset
571 (define_mode_attr Vhalf [(V8QI "v4qi") (V16QI "v8qi")
kono
parents:
diff changeset
572 (V4HI "v2hi") (V8HI "v4hi")
kono
parents:
diff changeset
573 (V2SI "si") (V4SI "v2si")
kono
parents:
diff changeset
574 (V2DI "di") (V2SF "sf")
kono
parents:
diff changeset
575 (V4SF "v2sf") (V2DF "df")])
kono
parents:
diff changeset
576
kono
parents:
diff changeset
577 ;; Double modes of vector modes.
kono
parents:
diff changeset
578 (define_mode_attr VDBL [(V8QI "V16QI") (V4HI "V8HI")
kono
parents:
diff changeset
579 (V4HF "V8HF")
kono
parents:
diff changeset
580 (V2SI "V4SI") (V2SF "V4SF")
kono
parents:
diff changeset
581 (SI "V2SI") (DI "V2DI")
kono
parents:
diff changeset
582 (DF "V2DF")])
kono
parents:
diff changeset
583
kono
parents:
diff changeset
584 ;; Register suffix for double-length mode.
kono
parents:
diff changeset
585 (define_mode_attr Vdtype [(V4HF "8h") (V2SF "4s")])
kono
parents:
diff changeset
586
kono
parents:
diff changeset
587 ;; Double modes of vector modes (lower case).
kono
parents:
diff changeset
588 (define_mode_attr Vdbl [(V8QI "v16qi") (V4HI "v8hi")
kono
parents:
diff changeset
589 (V4HF "v8hf")
kono
parents:
diff changeset
590 (V2SI "v4si") (V2SF "v4sf")
kono
parents:
diff changeset
591 (SI "v2si") (DI "v2di")
kono
parents:
diff changeset
592 (DF "v2df")])
kono
parents:
diff changeset
593
kono
parents:
diff changeset
594 ;; Modes with double-width elements.
kono
parents:
diff changeset
595 (define_mode_attr VDBLW [(V8QI "V4HI") (V16QI "V8HI")
kono
parents:
diff changeset
596 (V4HI "V2SI") (V8HI "V4SI")
kono
parents:
diff changeset
597 (V2SI "DI") (V4SI "V2DI")])
kono
parents:
diff changeset
598
kono
parents:
diff changeset
599 ;; Narrowed modes for VDN.
kono
parents:
diff changeset
600 (define_mode_attr VNARROWD [(V4HI "V8QI") (V2SI "V4HI")
kono
parents:
diff changeset
601 (DI "V2SI")])
kono
parents:
diff changeset
602
kono
parents:
diff changeset
603 ;; Narrowed double-modes for VQN (Used for XTN).
kono
parents:
diff changeset
604 (define_mode_attr VNARROWQ [(V8HI "V8QI") (V4SI "V4HI")
kono
parents:
diff changeset
605 (V2DI "V2SI")
kono
parents:
diff changeset
606 (DI "SI") (SI "HI")
kono
parents:
diff changeset
607 (HI "QI")])
kono
parents:
diff changeset
608
kono
parents:
diff changeset
609 ;; Narrowed quad-modes for VQN (Used for XTN2).
kono
parents:
diff changeset
610 (define_mode_attr VNARROWQ2 [(V8HI "V16QI") (V4SI "V8HI")
kono
parents:
diff changeset
611 (V2DI "V4SI")])
kono
parents:
diff changeset
612
kono
parents:
diff changeset
613 ;; Register suffix narrowed modes for VQN.
kono
parents:
diff changeset
614 (define_mode_attr Vntype [(V8HI "8b") (V4SI "4h")
kono
parents:
diff changeset
615 (V2DI "2s")])
kono
parents:
diff changeset
616
kono
parents:
diff changeset
617 ;; Register suffix narrowed modes for VQN.
kono
parents:
diff changeset
618 (define_mode_attr V2ntype [(V8HI "16b") (V4SI "8h")
kono
parents:
diff changeset
619 (V2DI "4s")])
kono
parents:
diff changeset
620
kono
parents:
diff changeset
621 ;; Widened modes of vector modes.
kono
parents:
diff changeset
622 (define_mode_attr VWIDE [(V8QI "V8HI") (V4HI "V4SI")
kono
parents:
diff changeset
623 (V2SI "V2DI") (V16QI "V8HI")
kono
parents:
diff changeset
624 (V8HI "V4SI") (V4SI "V2DI")
kono
parents:
diff changeset
625 (HI "SI") (SI "DI")
kono
parents:
diff changeset
626 (V8HF "V4SF") (V4SF "V2DF")
kono
parents:
diff changeset
627 (V4HF "V4SF") (V2SF "V2DF")]
kono
parents:
diff changeset
628 )
kono
parents:
diff changeset
629
kono
parents:
diff changeset
630 ;; Widened modes of vector modes, lowercase
kono
parents:
diff changeset
631 (define_mode_attr Vwide [(V2SF "v2df") (V4HF "v4sf")])
kono
parents:
diff changeset
632
kono
parents:
diff changeset
633 ;; Widened mode register suffixes for VD_BHSI/VQW/VQ_HSF.
kono
parents:
diff changeset
634 (define_mode_attr Vwtype [(V8QI "8h") (V4HI "4s")
kono
parents:
diff changeset
635 (V2SI "2d") (V16QI "8h")
kono
parents:
diff changeset
636 (V8HI "4s") (V4SI "2d")
kono
parents:
diff changeset
637 (V8HF "4s") (V4SF "2d")])
kono
parents:
diff changeset
638
kono
parents:
diff changeset
639 ;; Widened mode register suffixes for VDW/VQW.
kono
parents:
diff changeset
640 (define_mode_attr Vmwtype [(V8QI ".8h") (V4HI ".4s")
kono
parents:
diff changeset
641 (V2SI ".2d") (V16QI ".8h")
kono
parents:
diff changeset
642 (V8HI ".4s") (V4SI ".2d")
kono
parents:
diff changeset
643 (V4HF ".4s") (V2SF ".2d")
kono
parents:
diff changeset
644 (SI "") (HI "")])
kono
parents:
diff changeset
645
kono
parents:
diff changeset
646 ;; Lower part register suffixes for VQW/VQ_HSF.
kono
parents:
diff changeset
647 (define_mode_attr Vhalftype [(V16QI "8b") (V8HI "4h")
kono
parents:
diff changeset
648 (V4SI "2s") (V8HF "4h")
kono
parents:
diff changeset
649 (V4SF "2s")])
kono
parents:
diff changeset
650
kono
parents:
diff changeset
651 ;; Define corresponding core/FP element mode for each vector mode.
kono
parents:
diff changeset
652 (define_mode_attr vw [(V8QI "w") (V16QI "w")
kono
parents:
diff changeset
653 (V4HI "w") (V8HI "w")
kono
parents:
diff changeset
654 (V2SI "w") (V4SI "w")
kono
parents:
diff changeset
655 (DI "x") (V2DI "x")
kono
parents:
diff changeset
656 (V2SF "s") (V4SF "s")
kono
parents:
diff changeset
657 (V2DF "d")])
kono
parents:
diff changeset
658
kono
parents:
diff changeset
659 ;; Corresponding core element mode for each vector mode. This is a
kono
parents:
diff changeset
660 ;; variation on <vw> mapping FP modes to GP regs.
kono
parents:
diff changeset
661 (define_mode_attr vwcore [(V8QI "w") (V16QI "w")
kono
parents:
diff changeset
662 (V4HI "w") (V8HI "w")
kono
parents:
diff changeset
663 (V2SI "w") (V4SI "w")
kono
parents:
diff changeset
664 (DI "x") (V2DI "x")
kono
parents:
diff changeset
665 (V4HF "w") (V8HF "w")
kono
parents:
diff changeset
666 (V2SF "w") (V4SF "w")
kono
parents:
diff changeset
667 (V2DF "x")])
kono
parents:
diff changeset
668
kono
parents:
diff changeset
669 ;; Double vector types for ALLX.
kono
parents:
diff changeset
670 (define_mode_attr Vallxd [(QI "8b") (HI "4h") (SI "2s")])
kono
parents:
diff changeset
671
kono
parents:
diff changeset
672 ;; Mode with floating-point values replaced by like-sized integers.
kono
parents:
diff changeset
673 (define_mode_attr V_INT_EQUIV [(V8QI "V8QI") (V16QI "V16QI")
kono
parents:
diff changeset
674 (V4HI "V4HI") (V8HI "V8HI")
kono
parents:
diff changeset
675 (V2SI "V2SI") (V4SI "V4SI")
kono
parents:
diff changeset
676 (DI "DI") (V2DI "V2DI")
kono
parents:
diff changeset
677 (V4HF "V4HI") (V8HF "V8HI")
kono
parents:
diff changeset
678 (V2SF "V2SI") (V4SF "V4SI")
kono
parents:
diff changeset
679 (V2DF "V2DI") (DF "DI")
kono
parents:
diff changeset
680 (SF "SI") (HF "HI")])
kono
parents:
diff changeset
681
kono
parents:
diff changeset
682 ;; Lower case mode with floating-point values replaced by like-sized integers.
kono
parents:
diff changeset
683 (define_mode_attr v_int_equiv [(V8QI "v8qi") (V16QI "v16qi")
kono
parents:
diff changeset
684 (V4HI "v4hi") (V8HI "v8hi")
kono
parents:
diff changeset
685 (V2SI "v2si") (V4SI "v4si")
kono
parents:
diff changeset
686 (DI "di") (V2DI "v2di")
kono
parents:
diff changeset
687 (V4HF "v4hi") (V8HF "v8hi")
kono
parents:
diff changeset
688 (V2SF "v2si") (V4SF "v4si")
kono
parents:
diff changeset
689 (V2DF "v2di") (DF "di")
kono
parents:
diff changeset
690 (SF "si")])
kono
parents:
diff changeset
691
kono
parents:
diff changeset
692 ;; Mode for vector conditional operations where the comparison has
kono
parents:
diff changeset
693 ;; different type from the lhs.
kono
parents:
diff changeset
694 (define_mode_attr V_cmp_mixed [(V2SI "V2SF") (V4SI "V4SF")
kono
parents:
diff changeset
695 (V2DI "V2DF") (V2SF "V2SI")
kono
parents:
diff changeset
696 (V4SF "V4SI") (V2DF "V2DI")])
kono
parents:
diff changeset
697
kono
parents:
diff changeset
698 (define_mode_attr v_cmp_mixed [(V2SI "v2sf") (V4SI "v4sf")
kono
parents:
diff changeset
699 (V2DI "v2df") (V2SF "v2si")
kono
parents:
diff changeset
700 (V4SF "v4si") (V2DF "v2di")])
kono
parents:
diff changeset
701
kono
parents:
diff changeset
702 ;; Lower case element modes (as used in shift immediate patterns).
kono
parents:
diff changeset
703 (define_mode_attr ve_mode [(V8QI "qi") (V16QI "qi")
kono
parents:
diff changeset
704 (V4HI "hi") (V8HI "hi")
kono
parents:
diff changeset
705 (V2SI "si") (V4SI "si")
kono
parents:
diff changeset
706 (DI "di") (V2DI "di")
kono
parents:
diff changeset
707 (QI "qi") (HI "hi")
kono
parents:
diff changeset
708 (SI "si")])
kono
parents:
diff changeset
709
kono
parents:
diff changeset
710 ;; Vm for lane instructions is restricted to FP_LO_REGS.
kono
parents:
diff changeset
711 (define_mode_attr vwx [(V4HI "x") (V8HI "x") (HI "x")
kono
parents:
diff changeset
712 (V2SI "w") (V4SI "w") (SI "w")])
kono
parents:
diff changeset
713
kono
parents:
diff changeset
714 (define_mode_attr Vendreg [(OI "T") (CI "U") (XI "V")])
kono
parents:
diff changeset
715
kono
parents:
diff changeset
716 ;; This is both the number of Q-Registers needed to hold the corresponding
kono
parents:
diff changeset
717 ;; opaque large integer mode, and the number of elements touched by the
kono
parents:
diff changeset
718 ;; ld..._lane and st..._lane operations.
kono
parents:
diff changeset
719 (define_mode_attr nregs [(OI "2") (CI "3") (XI "4")])
kono
parents:
diff changeset
720
kono
parents:
diff changeset
721 ;; Mode for atomic operation suffixes
kono
parents:
diff changeset
722 (define_mode_attr atomic_sfx
kono
parents:
diff changeset
723 [(QI "b") (HI "h") (SI "") (DI "")])
kono
parents:
diff changeset
724
kono
parents:
diff changeset
725 (define_mode_attr fcvt_target [(V2DF "v2di") (V4SF "v4si") (V2SF "v2si")
kono
parents:
diff changeset
726 (V2DI "v2df") (V4SI "v4sf") (V2SI "v2sf")
kono
parents:
diff changeset
727 (SF "si") (DF "di") (SI "sf") (DI "df")
kono
parents:
diff changeset
728 (V4HF "v4hi") (V8HF "v8hi") (V4HI "v4hf")
kono
parents:
diff changeset
729 (V8HI "v8hf") (HF "hi") (HI "hf")])
kono
parents:
diff changeset
730 (define_mode_attr FCVT_TARGET [(V2DF "V2DI") (V4SF "V4SI") (V2SF "V2SI")
kono
parents:
diff changeset
731 (V2DI "V2DF") (V4SI "V4SF") (V2SI "V2SF")
kono
parents:
diff changeset
732 (SF "SI") (DF "DI") (SI "SF") (DI "DF")
kono
parents:
diff changeset
733 (V4HF "V4HI") (V8HF "V8HI") (V4HI "V4HF")
kono
parents:
diff changeset
734 (V8HI "V8HF") (HF "HI") (HI "HF")])
kono
parents:
diff changeset
735
kono
parents:
diff changeset
736
kono
parents:
diff changeset
737 ;; for the inequal width integer to fp conversions
kono
parents:
diff changeset
738 (define_mode_attr fcvt_iesize [(HF "di") (SF "di") (DF "si")])
kono
parents:
diff changeset
739 (define_mode_attr FCVT_IESIZE [(HF "DI") (SF "DI") (DF "SI")])
kono
parents:
diff changeset
740
kono
parents:
diff changeset
741 (define_mode_attr VSWAP_WIDTH [(V8QI "V16QI") (V16QI "V8QI")
kono
parents:
diff changeset
742 (V4HI "V8HI") (V8HI "V4HI")
kono
parents:
diff changeset
743 (V2SI "V4SI") (V4SI "V2SI")
kono
parents:
diff changeset
744 (DI "V2DI") (V2DI "DI")
kono
parents:
diff changeset
745 (V2SF "V4SF") (V4SF "V2SF")
kono
parents:
diff changeset
746 (V4HF "V8HF") (V8HF "V4HF")
kono
parents:
diff changeset
747 (DF "V2DF") (V2DF "DF")])
kono
parents:
diff changeset
748
kono
parents:
diff changeset
749 (define_mode_attr vswap_width_name [(V8QI "to_128") (V16QI "to_64")
kono
parents:
diff changeset
750 (V4HI "to_128") (V8HI "to_64")
kono
parents:
diff changeset
751 (V2SI "to_128") (V4SI "to_64")
kono
parents:
diff changeset
752 (DI "to_128") (V2DI "to_64")
kono
parents:
diff changeset
753 (V4HF "to_128") (V8HF "to_64")
kono
parents:
diff changeset
754 (V2SF "to_128") (V4SF "to_64")
kono
parents:
diff changeset
755 (DF "to_128") (V2DF "to_64")])
kono
parents:
diff changeset
756
kono
parents:
diff changeset
757 ;; For certain vector-by-element multiplication instructions we must
kono
parents:
diff changeset
758 ;; constrain the 16-bit cases to use only V0-V15. This is covered by
kono
parents:
diff changeset
759 ;; the 'x' constraint. All other modes may use the 'w' constraint.
kono
parents:
diff changeset
760 (define_mode_attr h_con [(V2SI "w") (V4SI "w")
kono
parents:
diff changeset
761 (V4HI "x") (V8HI "x")
kono
parents:
diff changeset
762 (V4HF "x") (V8HF "x")
kono
parents:
diff changeset
763 (V2SF "w") (V4SF "w")
kono
parents:
diff changeset
764 (V2DF "w") (DF "w")])
kono
parents:
diff changeset
765
kono
parents:
diff changeset
766 ;; Defined to 'f' for types whose element type is a float type.
kono
parents:
diff changeset
767 (define_mode_attr f [(V8QI "") (V16QI "")
kono
parents:
diff changeset
768 (V4HI "") (V8HI "")
kono
parents:
diff changeset
769 (V2SI "") (V4SI "")
kono
parents:
diff changeset
770 (DI "") (V2DI "")
kono
parents:
diff changeset
771 (V4HF "f") (V8HF "f")
kono
parents:
diff changeset
772 (V2SF "f") (V4SF "f")
kono
parents:
diff changeset
773 (V2DF "f") (DF "f")])
kono
parents:
diff changeset
774
kono
parents:
diff changeset
775 ;; Defined to '_fp' for types whose element type is a float type.
kono
parents:
diff changeset
776 (define_mode_attr fp [(V8QI "") (V16QI "")
kono
parents:
diff changeset
777 (V4HI "") (V8HI "")
kono
parents:
diff changeset
778 (V2SI "") (V4SI "")
kono
parents:
diff changeset
779 (DI "") (V2DI "")
kono
parents:
diff changeset
780 (V4HF "_fp") (V8HF "_fp")
kono
parents:
diff changeset
781 (V2SF "_fp") (V4SF "_fp")
kono
parents:
diff changeset
782 (V2DF "_fp") (DF "_fp")
kono
parents:
diff changeset
783 (SF "_fp")])
kono
parents:
diff changeset
784
kono
parents:
diff changeset
785 ;; Defined to '_q' for 128-bit types.
kono
parents:
diff changeset
786 (define_mode_attr q [(V8QI "") (V16QI "_q")
kono
parents:
diff changeset
787 (V4HI "") (V8HI "_q")
kono
parents:
diff changeset
788 (V2SI "") (V4SI "_q")
kono
parents:
diff changeset
789 (DI "") (V2DI "_q")
kono
parents:
diff changeset
790 (V4HF "") (V8HF "_q")
kono
parents:
diff changeset
791 (V2SF "") (V4SF "_q")
kono
parents:
diff changeset
792 (V2DF "_q")
kono
parents:
diff changeset
793 (QI "") (HI "") (SI "") (DI "") (HF "") (SF "") (DF "")])
kono
parents:
diff changeset
794
kono
parents:
diff changeset
795 (define_mode_attr vp [(V8QI "v") (V16QI "v")
kono
parents:
diff changeset
796 (V4HI "v") (V8HI "v")
kono
parents:
diff changeset
797 (V2SI "p") (V4SI "v")
kono
parents:
diff changeset
798 (V2DI "p") (V2DF "p")
kono
parents:
diff changeset
799 (V2SF "p") (V4SF "v")
kono
parents:
diff changeset
800 (V4HF "v") (V8HF "v")])
kono
parents:
diff changeset
801
kono
parents:
diff changeset
802 (define_mode_attr vsi2qi [(V2SI "v8qi") (V4SI "v16qi")])
kono
parents:
diff changeset
803 (define_mode_attr VSI2QI [(V2SI "V8QI") (V4SI "V16QI")])
kono
parents:
diff changeset
804
kono
parents:
diff changeset
805
kono
parents:
diff changeset
806 ;; Register suffix for DOTPROD input types from the return type.
kono
parents:
diff changeset
807 (define_mode_attr Vdottype [(V2SI "8b") (V4SI "16b")])
kono
parents:
diff changeset
808
kono
parents:
diff changeset
809 ;; Sum of lengths of instructions needed to move vector registers of a mode.
kono
parents:
diff changeset
810 (define_mode_attr insn_count [(OI "8") (CI "12") (XI "16")])
kono
parents:
diff changeset
811
kono
parents:
diff changeset
812 ;; -fpic small model GOT reloc modifers: gotpage_lo15/lo14 for ILP64/32.
kono
parents:
diff changeset
813 ;; No need of iterator for -fPIC as it use got_lo12 for both modes.
kono
parents:
diff changeset
814 (define_mode_attr got_modifier [(SI "gotpage_lo14") (DI "gotpage_lo15")])
kono
parents:
diff changeset
815
kono
parents:
diff changeset
816 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
817 ;; Code Iterators
kono
parents:
diff changeset
818 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
819
kono
parents:
diff changeset
820 ;; This code iterator allows the various shifts supported on the core
kono
parents:
diff changeset
821 (define_code_iterator SHIFT [ashift ashiftrt lshiftrt rotatert])
kono
parents:
diff changeset
822
kono
parents:
diff changeset
823 ;; This code iterator allows the shifts supported in arithmetic instructions
kono
parents:
diff changeset
824 (define_code_iterator ASHIFT [ashift ashiftrt lshiftrt])
kono
parents:
diff changeset
825
kono
parents:
diff changeset
826 ;; Code iterator for logical operations
kono
parents:
diff changeset
827 (define_code_iterator LOGICAL [and ior xor])
kono
parents:
diff changeset
828
kono
parents:
diff changeset
829 ;; Code iterator for logical operations whose :nlogical works on SIMD registers.
kono
parents:
diff changeset
830 (define_code_iterator NLOGICAL [and ior])
kono
parents:
diff changeset
831
kono
parents:
diff changeset
832 ;; Code iterator for unary negate and bitwise complement.
kono
parents:
diff changeset
833 (define_code_iterator NEG_NOT [neg not])
kono
parents:
diff changeset
834
kono
parents:
diff changeset
835 ;; Code iterator for sign/zero extension
kono
parents:
diff changeset
836 (define_code_iterator ANY_EXTEND [sign_extend zero_extend])
kono
parents:
diff changeset
837
kono
parents:
diff changeset
838 ;; All division operations (signed/unsigned)
kono
parents:
diff changeset
839 (define_code_iterator ANY_DIV [div udiv])
kono
parents:
diff changeset
840
kono
parents:
diff changeset
841 ;; Code iterator for sign/zero extraction
kono
parents:
diff changeset
842 (define_code_iterator ANY_EXTRACT [sign_extract zero_extract])
kono
parents:
diff changeset
843
kono
parents:
diff changeset
844 ;; Code iterator for equality comparisons
kono
parents:
diff changeset
845 (define_code_iterator EQL [eq ne])
kono
parents:
diff changeset
846
kono
parents:
diff changeset
847 ;; Code iterator for less-than and greater/equal-to
kono
parents:
diff changeset
848 (define_code_iterator LTGE [lt ge])
kono
parents:
diff changeset
849
kono
parents:
diff changeset
850 ;; Iterator for __sync_<op> operations that where the operation can be
kono
parents:
diff changeset
851 ;; represented directly RTL. This is all of the sync operations bar
kono
parents:
diff changeset
852 ;; nand.
kono
parents:
diff changeset
853 (define_code_iterator atomic_op [plus minus ior xor and])
kono
parents:
diff changeset
854
kono
parents:
diff changeset
855 ;; Iterator for integer conversions
kono
parents:
diff changeset
856 (define_code_iterator FIXUORS [fix unsigned_fix])
kono
parents:
diff changeset
857
kono
parents:
diff changeset
858 ;; Iterator for float conversions
kono
parents:
diff changeset
859 (define_code_iterator FLOATUORS [float unsigned_float])
kono
parents:
diff changeset
860
kono
parents:
diff changeset
861 ;; Code iterator for variants of vector max and min.
kono
parents:
diff changeset
862 (define_code_iterator MAXMIN [smax smin umax umin])
kono
parents:
diff changeset
863
kono
parents:
diff changeset
864 (define_code_iterator FMAXMIN [smax smin])
kono
parents:
diff changeset
865
kono
parents:
diff changeset
866 ;; Code iterator for variants of vector max and min.
kono
parents:
diff changeset
867 (define_code_iterator ADDSUB [plus minus])
kono
parents:
diff changeset
868
kono
parents:
diff changeset
869 ;; Code iterator for variants of vector saturating binary ops.
kono
parents:
diff changeset
870 (define_code_iterator BINQOPS [ss_plus us_plus ss_minus us_minus])
kono
parents:
diff changeset
871
kono
parents:
diff changeset
872 ;; Code iterator for variants of vector saturating unary ops.
kono
parents:
diff changeset
873 (define_code_iterator UNQOPS [ss_neg ss_abs])
kono
parents:
diff changeset
874
kono
parents:
diff changeset
875 ;; Code iterator for signed variants of vector saturating binary ops.
kono
parents:
diff changeset
876 (define_code_iterator SBINQOPS [ss_plus ss_minus])
kono
parents:
diff changeset
877
kono
parents:
diff changeset
878 ;; Comparison operators for <F>CM.
kono
parents:
diff changeset
879 (define_code_iterator COMPARISONS [lt le eq ge gt])
kono
parents:
diff changeset
880
kono
parents:
diff changeset
881 ;; Unsigned comparison operators.
kono
parents:
diff changeset
882 (define_code_iterator UCOMPARISONS [ltu leu geu gtu])
kono
parents:
diff changeset
883
kono
parents:
diff changeset
884 ;; Unsigned comparison operators.
kono
parents:
diff changeset
885 (define_code_iterator FAC_COMPARISONS [lt le ge gt])
kono
parents:
diff changeset
886
kono
parents:
diff changeset
887 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
888 ;; Code Attributes
kono
parents:
diff changeset
889 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
890 ;; Map rtl objects to optab names
kono
parents:
diff changeset
891 (define_code_attr optab [(ashift "ashl")
kono
parents:
diff changeset
892 (ashiftrt "ashr")
kono
parents:
diff changeset
893 (lshiftrt "lshr")
kono
parents:
diff changeset
894 (rotatert "rotr")
kono
parents:
diff changeset
895 (sign_extend "extend")
kono
parents:
diff changeset
896 (zero_extend "zero_extend")
kono
parents:
diff changeset
897 (sign_extract "extv")
kono
parents:
diff changeset
898 (zero_extract "extzv")
kono
parents:
diff changeset
899 (fix "fix")
kono
parents:
diff changeset
900 (unsigned_fix "fixuns")
kono
parents:
diff changeset
901 (float "float")
kono
parents:
diff changeset
902 (unsigned_float "floatuns")
kono
parents:
diff changeset
903 (and "and")
kono
parents:
diff changeset
904 (ior "ior")
kono
parents:
diff changeset
905 (xor "xor")
kono
parents:
diff changeset
906 (not "one_cmpl")
kono
parents:
diff changeset
907 (neg "neg")
kono
parents:
diff changeset
908 (plus "add")
kono
parents:
diff changeset
909 (minus "sub")
kono
parents:
diff changeset
910 (ss_plus "qadd")
kono
parents:
diff changeset
911 (us_plus "qadd")
kono
parents:
diff changeset
912 (ss_minus "qsub")
kono
parents:
diff changeset
913 (us_minus "qsub")
kono
parents:
diff changeset
914 (ss_neg "qneg")
kono
parents:
diff changeset
915 (ss_abs "qabs")
kono
parents:
diff changeset
916 (eq "eq")
kono
parents:
diff changeset
917 (ne "ne")
kono
parents:
diff changeset
918 (lt "lt")
kono
parents:
diff changeset
919 (ge "ge")
kono
parents:
diff changeset
920 (le "le")
kono
parents:
diff changeset
921 (gt "gt")
kono
parents:
diff changeset
922 (ltu "ltu")
kono
parents:
diff changeset
923 (leu "leu")
kono
parents:
diff changeset
924 (geu "geu")
kono
parents:
diff changeset
925 (gtu "gtu")])
kono
parents:
diff changeset
926
kono
parents:
diff changeset
927 ;; For comparison operators we use the FCM* and CM* instructions.
kono
parents:
diff changeset
928 ;; As there are no CMLE or CMLT instructions which act on 3 vector
kono
parents:
diff changeset
929 ;; operands, we must use CMGE or CMGT and swap the order of the
kono
parents:
diff changeset
930 ;; source operands.
kono
parents:
diff changeset
931
kono
parents:
diff changeset
932 (define_code_attr n_optab [(lt "gt") (le "ge") (eq "eq") (ge "ge") (gt "gt")
kono
parents:
diff changeset
933 (ltu "hi") (leu "hs") (geu "hs") (gtu "hi")])
kono
parents:
diff changeset
934 (define_code_attr cmp_1 [(lt "2") (le "2") (eq "1") (ge "1") (gt "1")
kono
parents:
diff changeset
935 (ltu "2") (leu "2") (geu "1") (gtu "1")])
kono
parents:
diff changeset
936 (define_code_attr cmp_2 [(lt "1") (le "1") (eq "2") (ge "2") (gt "2")
kono
parents:
diff changeset
937 (ltu "1") (leu "1") (geu "2") (gtu "2")])
kono
parents:
diff changeset
938
kono
parents:
diff changeset
939 (define_code_attr CMP [(lt "LT") (le "LE") (eq "EQ") (ge "GE") (gt "GT")
kono
parents:
diff changeset
940 (ltu "LTU") (leu "LEU") (ne "NE") (geu "GEU")
kono
parents:
diff changeset
941 (gtu "GTU")])
kono
parents:
diff changeset
942
kono
parents:
diff changeset
943 (define_code_attr fix_trunc_optab [(fix "fix_trunc")
kono
parents:
diff changeset
944 (unsigned_fix "fixuns_trunc")])
kono
parents:
diff changeset
945
kono
parents:
diff changeset
946 ;; Optab prefix for sign/zero-extending operations
kono
parents:
diff changeset
947 (define_code_attr su_optab [(sign_extend "") (zero_extend "u")
kono
parents:
diff changeset
948 (div "") (udiv "u")
kono
parents:
diff changeset
949 (fix "") (unsigned_fix "u")
kono
parents:
diff changeset
950 (float "s") (unsigned_float "u")
kono
parents:
diff changeset
951 (ss_plus "s") (us_plus "u")
kono
parents:
diff changeset
952 (ss_minus "s") (us_minus "u")])
kono
parents:
diff changeset
953
kono
parents:
diff changeset
954 ;; Similar for the instruction mnemonics
kono
parents:
diff changeset
955 (define_code_attr shift [(ashift "lsl") (ashiftrt "asr")
kono
parents:
diff changeset
956 (lshiftrt "lsr") (rotatert "ror")])
kono
parents:
diff changeset
957
kono
parents:
diff changeset
958 ;; Map shift operators onto underlying bit-field instructions
kono
parents:
diff changeset
959 (define_code_attr bfshift [(ashift "ubfiz") (ashiftrt "sbfx")
kono
parents:
diff changeset
960 (lshiftrt "ubfx") (rotatert "extr")])
kono
parents:
diff changeset
961
kono
parents:
diff changeset
962 ;; Logical operator instruction mnemonics
kono
parents:
diff changeset
963 (define_code_attr logical [(and "and") (ior "orr") (xor "eor")])
kono
parents:
diff changeset
964
kono
parents:
diff changeset
965 ;; Operation names for negate and bitwise complement.
kono
parents:
diff changeset
966 (define_code_attr neg_not_op [(neg "neg") (not "not")])
kono
parents:
diff changeset
967
kono
parents:
diff changeset
968 ;; Similar, but when not(op)
kono
parents:
diff changeset
969 (define_code_attr nlogical [(and "bic") (ior "orn") (xor "eon")])
kono
parents:
diff changeset
970
kono
parents:
diff changeset
971 ;; Sign- or zero-extending data-op
kono
parents:
diff changeset
972 (define_code_attr su [(sign_extend "s") (zero_extend "u")
kono
parents:
diff changeset
973 (sign_extract "s") (zero_extract "u")
kono
parents:
diff changeset
974 (fix "s") (unsigned_fix "u")
kono
parents:
diff changeset
975 (div "s") (udiv "u")
kono
parents:
diff changeset
976 (smax "s") (umax "u")
kono
parents:
diff changeset
977 (smin "s") (umin "u")])
kono
parents:
diff changeset
978
kono
parents:
diff changeset
979 ;; Emit conditional branch instructions.
kono
parents:
diff changeset
980 (define_code_attr bcond [(eq "beq") (ne "bne") (lt "bne") (ge "beq")])
kono
parents:
diff changeset
981
kono
parents:
diff changeset
982 ;; Emit cbz/cbnz depending on comparison type.
kono
parents:
diff changeset
983 (define_code_attr cbz [(eq "cbz") (ne "cbnz") (lt "cbnz") (ge "cbz")])
kono
parents:
diff changeset
984
kono
parents:
diff changeset
985 ;; Emit inverted cbz/cbnz depending on comparison type.
kono
parents:
diff changeset
986 (define_code_attr inv_cb [(eq "cbnz") (ne "cbz") (lt "cbz") (ge "cbnz")])
kono
parents:
diff changeset
987
kono
parents:
diff changeset
988 ;; Emit tbz/tbnz depending on comparison type.
kono
parents:
diff changeset
989 (define_code_attr tbz [(eq "tbz") (ne "tbnz") (lt "tbnz") (ge "tbz")])
kono
parents:
diff changeset
990
kono
parents:
diff changeset
991 ;; Emit inverted tbz/tbnz depending on comparison type.
kono
parents:
diff changeset
992 (define_code_attr inv_tb [(eq "tbnz") (ne "tbz") (lt "tbz") (ge "tbnz")])
kono
parents:
diff changeset
993
kono
parents:
diff changeset
994 ;; Max/min attributes.
kono
parents:
diff changeset
995 (define_code_attr maxmin [(smax "max")
kono
parents:
diff changeset
996 (smin "min")
kono
parents:
diff changeset
997 (umax "max")
kono
parents:
diff changeset
998 (umin "min")])
kono
parents:
diff changeset
999
kono
parents:
diff changeset
1000 ;; MLA/MLS attributes.
kono
parents:
diff changeset
1001 (define_code_attr as [(ss_plus "a") (ss_minus "s")])
kono
parents:
diff changeset
1002
kono
parents:
diff changeset
1003 ;; Atomic operations
kono
parents:
diff changeset
1004 (define_code_attr atomic_optab
kono
parents:
diff changeset
1005 [(ior "or") (xor "xor") (and "and") (plus "add") (minus "sub")])
kono
parents:
diff changeset
1006
kono
parents:
diff changeset
1007 (define_code_attr atomic_op_operand
kono
parents:
diff changeset
1008 [(ior "aarch64_logical_operand")
kono
parents:
diff changeset
1009 (xor "aarch64_logical_operand")
kono
parents:
diff changeset
1010 (and "aarch64_logical_operand")
kono
parents:
diff changeset
1011 (plus "aarch64_plus_operand")
kono
parents:
diff changeset
1012 (minus "aarch64_plus_operand")])
kono
parents:
diff changeset
1013
kono
parents:
diff changeset
1014 ;; Constants acceptable for atomic operations.
kono
parents:
diff changeset
1015 ;; This definition must appear in this file before the iterators it refers to.
kono
parents:
diff changeset
1016 (define_code_attr const_atomic
kono
parents:
diff changeset
1017 [(plus "IJ") (minus "IJ")
kono
parents:
diff changeset
1018 (xor "<lconst_atomic>") (ior "<lconst_atomic>")
kono
parents:
diff changeset
1019 (and "<lconst_atomic>")])
kono
parents:
diff changeset
1020
kono
parents:
diff changeset
1021 ;; Attribute to describe constants acceptable in atomic logical operations
kono
parents:
diff changeset
1022 (define_mode_attr lconst_atomic [(QI "K") (HI "K") (SI "K") (DI "L")])
kono
parents:
diff changeset
1023
kono
parents:
diff changeset
1024 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
1025 ;; Int Iterators.
kono
parents:
diff changeset
1026 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
1027 (define_int_iterator MAXMINV [UNSPEC_UMAXV UNSPEC_UMINV
kono
parents:
diff changeset
1028 UNSPEC_SMAXV UNSPEC_SMINV])
kono
parents:
diff changeset
1029
kono
parents:
diff changeset
1030 (define_int_iterator FMAXMINV [UNSPEC_FMAXV UNSPEC_FMINV
kono
parents:
diff changeset
1031 UNSPEC_FMAXNMV UNSPEC_FMINNMV])
kono
parents:
diff changeset
1032
kono
parents:
diff changeset
1033 (define_int_iterator HADDSUB [UNSPEC_SHADD UNSPEC_UHADD
kono
parents:
diff changeset
1034 UNSPEC_SRHADD UNSPEC_URHADD
kono
parents:
diff changeset
1035 UNSPEC_SHSUB UNSPEC_UHSUB
kono
parents:
diff changeset
1036 UNSPEC_SRHSUB UNSPEC_URHSUB])
kono
parents:
diff changeset
1037
kono
parents:
diff changeset
1038 (define_int_iterator DOTPROD [UNSPEC_SDOT UNSPEC_UDOT])
kono
parents:
diff changeset
1039
kono
parents:
diff changeset
1040 (define_int_iterator ADDSUBHN [UNSPEC_ADDHN UNSPEC_RADDHN
kono
parents:
diff changeset
1041 UNSPEC_SUBHN UNSPEC_RSUBHN])
kono
parents:
diff changeset
1042
kono
parents:
diff changeset
1043 (define_int_iterator ADDSUBHN2 [UNSPEC_ADDHN2 UNSPEC_RADDHN2
kono
parents:
diff changeset
1044 UNSPEC_SUBHN2 UNSPEC_RSUBHN2])
kono
parents:
diff changeset
1045
kono
parents:
diff changeset
1046 (define_int_iterator FMAXMIN_UNS [UNSPEC_FMAX UNSPEC_FMIN
kono
parents:
diff changeset
1047 UNSPEC_FMAXNM UNSPEC_FMINNM])
kono
parents:
diff changeset
1048
kono
parents:
diff changeset
1049 (define_int_iterator PAUTH_LR_SP [UNSPEC_PACISP UNSPEC_AUTISP])
kono
parents:
diff changeset
1050
kono
parents:
diff changeset
1051 (define_int_iterator PAUTH_17_16 [UNSPEC_PACI1716 UNSPEC_AUTI1716])
kono
parents:
diff changeset
1052
kono
parents:
diff changeset
1053 (define_int_iterator VQDMULH [UNSPEC_SQDMULH UNSPEC_SQRDMULH])
kono
parents:
diff changeset
1054
kono
parents:
diff changeset
1055 (define_int_iterator USSUQADD [UNSPEC_SUQADD UNSPEC_USQADD])
kono
parents:
diff changeset
1056
kono
parents:
diff changeset
1057 (define_int_iterator SUQMOVN [UNSPEC_SQXTN UNSPEC_UQXTN])
kono
parents:
diff changeset
1058
kono
parents:
diff changeset
1059 (define_int_iterator VSHL [UNSPEC_SSHL UNSPEC_USHL
kono
parents:
diff changeset
1060 UNSPEC_SRSHL UNSPEC_URSHL])
kono
parents:
diff changeset
1061
kono
parents:
diff changeset
1062 (define_int_iterator VSHLL [UNSPEC_SSHLL UNSPEC_USHLL])
kono
parents:
diff changeset
1063
kono
parents:
diff changeset
1064 (define_int_iterator VQSHL [UNSPEC_SQSHL UNSPEC_UQSHL
kono
parents:
diff changeset
1065 UNSPEC_SQRSHL UNSPEC_UQRSHL])
kono
parents:
diff changeset
1066
kono
parents:
diff changeset
1067 (define_int_iterator VSRA [UNSPEC_SSRA UNSPEC_USRA
kono
parents:
diff changeset
1068 UNSPEC_SRSRA UNSPEC_URSRA])
kono
parents:
diff changeset
1069
kono
parents:
diff changeset
1070 (define_int_iterator VSLRI [UNSPEC_SSLI UNSPEC_USLI
kono
parents:
diff changeset
1071 UNSPEC_SSRI UNSPEC_USRI])
kono
parents:
diff changeset
1072
kono
parents:
diff changeset
1073
kono
parents:
diff changeset
1074 (define_int_iterator VRSHR_N [UNSPEC_SRSHR UNSPEC_URSHR])
kono
parents:
diff changeset
1075
kono
parents:
diff changeset
1076 (define_int_iterator VQSHL_N [UNSPEC_SQSHLU UNSPEC_SQSHL UNSPEC_UQSHL])
kono
parents:
diff changeset
1077
kono
parents:
diff changeset
1078 (define_int_iterator VQSHRN_N [UNSPEC_SQSHRUN UNSPEC_SQRSHRUN
kono
parents:
diff changeset
1079 UNSPEC_SQSHRN UNSPEC_UQSHRN
kono
parents:
diff changeset
1080 UNSPEC_SQRSHRN UNSPEC_UQRSHRN])
kono
parents:
diff changeset
1081
kono
parents:
diff changeset
1082 (define_int_iterator SQRDMLH_AS [UNSPEC_SQRDMLAH UNSPEC_SQRDMLSH])
kono
parents:
diff changeset
1083
kono
parents:
diff changeset
1084 (define_int_iterator PERMUTE [UNSPEC_ZIP1 UNSPEC_ZIP2
kono
parents:
diff changeset
1085 UNSPEC_TRN1 UNSPEC_TRN2
kono
parents:
diff changeset
1086 UNSPEC_UZP1 UNSPEC_UZP2])
kono
parents:
diff changeset
1087
kono
parents:
diff changeset
1088 (define_int_iterator REVERSE [UNSPEC_REV64 UNSPEC_REV32 UNSPEC_REV16])
kono
parents:
diff changeset
1089
kono
parents:
diff changeset
1090 (define_int_iterator FRINT [UNSPEC_FRINTZ UNSPEC_FRINTP UNSPEC_FRINTM
kono
parents:
diff changeset
1091 UNSPEC_FRINTN UNSPEC_FRINTI UNSPEC_FRINTX
kono
parents:
diff changeset
1092 UNSPEC_FRINTA])
kono
parents:
diff changeset
1093
kono
parents:
diff changeset
1094 (define_int_iterator FCVT [UNSPEC_FRINTZ UNSPEC_FRINTP UNSPEC_FRINTM
kono
parents:
diff changeset
1095 UNSPEC_FRINTA UNSPEC_FRINTN])
kono
parents:
diff changeset
1096
kono
parents:
diff changeset
1097 (define_int_iterator FCVT_F2FIXED [UNSPEC_FCVTZS UNSPEC_FCVTZU])
kono
parents:
diff changeset
1098 (define_int_iterator FCVT_FIXED2F [UNSPEC_SCVTF UNSPEC_UCVTF])
kono
parents:
diff changeset
1099
kono
parents:
diff changeset
1100 (define_int_iterator FRECP [UNSPEC_FRECPE UNSPEC_FRECPX])
kono
parents:
diff changeset
1101
kono
parents:
diff changeset
1102 (define_int_iterator CRC [UNSPEC_CRC32B UNSPEC_CRC32H UNSPEC_CRC32W
kono
parents:
diff changeset
1103 UNSPEC_CRC32X UNSPEC_CRC32CB UNSPEC_CRC32CH
kono
parents:
diff changeset
1104 UNSPEC_CRC32CW UNSPEC_CRC32CX])
kono
parents:
diff changeset
1105
kono
parents:
diff changeset
1106 (define_int_iterator CRYPTO_AES [UNSPEC_AESE UNSPEC_AESD])
kono
parents:
diff changeset
1107 (define_int_iterator CRYPTO_AESMC [UNSPEC_AESMC UNSPEC_AESIMC])
kono
parents:
diff changeset
1108
kono
parents:
diff changeset
1109 (define_int_iterator CRYPTO_SHA1 [UNSPEC_SHA1C UNSPEC_SHA1M UNSPEC_SHA1P])
kono
parents:
diff changeset
1110
kono
parents:
diff changeset
1111 (define_int_iterator CRYPTO_SHA256 [UNSPEC_SHA256H UNSPEC_SHA256H2])
kono
parents:
diff changeset
1112
kono
parents:
diff changeset
1113 ;; Iterators for atomic operations.
kono
parents:
diff changeset
1114
kono
parents:
diff changeset
1115 (define_int_iterator ATOMIC_LDOP
kono
parents:
diff changeset
1116 [UNSPECV_ATOMIC_LDOP_OR UNSPECV_ATOMIC_LDOP_BIC
kono
parents:
diff changeset
1117 UNSPECV_ATOMIC_LDOP_XOR UNSPECV_ATOMIC_LDOP_PLUS])
kono
parents:
diff changeset
1118
kono
parents:
diff changeset
1119 (define_int_attr atomic_ldop
kono
parents:
diff changeset
1120 [(UNSPECV_ATOMIC_LDOP_OR "set") (UNSPECV_ATOMIC_LDOP_BIC "clr")
kono
parents:
diff changeset
1121 (UNSPECV_ATOMIC_LDOP_XOR "eor") (UNSPECV_ATOMIC_LDOP_PLUS "add")])
kono
parents:
diff changeset
1122
kono
parents:
diff changeset
1123 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
1124 ;; Int Iterators Attributes.
kono
parents:
diff changeset
1125 ;; -------------------------------------------------------------------
kono
parents:
diff changeset
1126 (define_int_attr maxmin_uns [(UNSPEC_UMAXV "umax")
kono
parents:
diff changeset
1127 (UNSPEC_UMINV "umin")
kono
parents:
diff changeset
1128 (UNSPEC_SMAXV "smax")
kono
parents:
diff changeset
1129 (UNSPEC_SMINV "smin")
kono
parents:
diff changeset
1130 (UNSPEC_FMAX "smax_nan")
kono
parents:
diff changeset
1131 (UNSPEC_FMAXNMV "smax")
kono
parents:
diff changeset
1132 (UNSPEC_FMAXV "smax_nan")
kono
parents:
diff changeset
1133 (UNSPEC_FMIN "smin_nan")
kono
parents:
diff changeset
1134 (UNSPEC_FMINNMV "smin")
kono
parents:
diff changeset
1135 (UNSPEC_FMINV "smin_nan")
kono
parents:
diff changeset
1136 (UNSPEC_FMAXNM "fmax")
kono
parents:
diff changeset
1137 (UNSPEC_FMINNM "fmin")])
kono
parents:
diff changeset
1138
kono
parents:
diff changeset
1139 (define_int_attr maxmin_uns_op [(UNSPEC_UMAXV "umax")
kono
parents:
diff changeset
1140 (UNSPEC_UMINV "umin")
kono
parents:
diff changeset
1141 (UNSPEC_SMAXV "smax")
kono
parents:
diff changeset
1142 (UNSPEC_SMINV "smin")
kono
parents:
diff changeset
1143 (UNSPEC_FMAX "fmax")
kono
parents:
diff changeset
1144 (UNSPEC_FMAXNMV "fmaxnm")
kono
parents:
diff changeset
1145 (UNSPEC_FMAXV "fmax")
kono
parents:
diff changeset
1146 (UNSPEC_FMIN "fmin")
kono
parents:
diff changeset
1147 (UNSPEC_FMINNMV "fminnm")
kono
parents:
diff changeset
1148 (UNSPEC_FMINV "fmin")
kono
parents:
diff changeset
1149 (UNSPEC_FMAXNM "fmaxnm")
kono
parents:
diff changeset
1150 (UNSPEC_FMINNM "fminnm")])
kono
parents:
diff changeset
1151
kono
parents:
diff changeset
1152 (define_int_attr sur [(UNSPEC_SHADD "s") (UNSPEC_UHADD "u")
kono
parents:
diff changeset
1153 (UNSPEC_SRHADD "sr") (UNSPEC_URHADD "ur")
kono
parents:
diff changeset
1154 (UNSPEC_SHSUB "s") (UNSPEC_UHSUB "u")
kono
parents:
diff changeset
1155 (UNSPEC_SRHSUB "sr") (UNSPEC_URHSUB "ur")
kono
parents:
diff changeset
1156 (UNSPEC_ADDHN "") (UNSPEC_RADDHN "r")
kono
parents:
diff changeset
1157 (UNSPEC_SUBHN "") (UNSPEC_RSUBHN "r")
kono
parents:
diff changeset
1158 (UNSPEC_ADDHN2 "") (UNSPEC_RADDHN2 "r")
kono
parents:
diff changeset
1159 (UNSPEC_SUBHN2 "") (UNSPEC_RSUBHN2 "r")
kono
parents:
diff changeset
1160 (UNSPEC_SQXTN "s") (UNSPEC_UQXTN "u")
kono
parents:
diff changeset
1161 (UNSPEC_USQADD "us") (UNSPEC_SUQADD "su")
kono
parents:
diff changeset
1162 (UNSPEC_SSLI "s") (UNSPEC_USLI "u")
kono
parents:
diff changeset
1163 (UNSPEC_SSRI "s") (UNSPEC_USRI "u")
kono
parents:
diff changeset
1164 (UNSPEC_USRA "u") (UNSPEC_SSRA "s")
kono
parents:
diff changeset
1165 (UNSPEC_URSRA "ur") (UNSPEC_SRSRA "sr")
kono
parents:
diff changeset
1166 (UNSPEC_URSHR "ur") (UNSPEC_SRSHR "sr")
kono
parents:
diff changeset
1167 (UNSPEC_SQSHLU "s") (UNSPEC_SQSHL "s")
kono
parents:
diff changeset
1168 (UNSPEC_UQSHL "u")
kono
parents:
diff changeset
1169 (UNSPEC_SQSHRUN "s") (UNSPEC_SQRSHRUN "s")
kono
parents:
diff changeset
1170 (UNSPEC_SQSHRN "s") (UNSPEC_UQSHRN "u")
kono
parents:
diff changeset
1171 (UNSPEC_SQRSHRN "s") (UNSPEC_UQRSHRN "u")
kono
parents:
diff changeset
1172 (UNSPEC_USHL "u") (UNSPEC_SSHL "s")
kono
parents:
diff changeset
1173 (UNSPEC_USHLL "u") (UNSPEC_SSHLL "s")
kono
parents:
diff changeset
1174 (UNSPEC_URSHL "ur") (UNSPEC_SRSHL "sr")
kono
parents:
diff changeset
1175 (UNSPEC_UQRSHL "u") (UNSPEC_SQRSHL "s")
kono
parents:
diff changeset
1176 (UNSPEC_SDOT "s") (UNSPEC_UDOT "u")
kono
parents:
diff changeset
1177 ])
kono
parents:
diff changeset
1178
kono
parents:
diff changeset
1179 (define_int_attr r [(UNSPEC_SQDMULH "") (UNSPEC_SQRDMULH "r")
kono
parents:
diff changeset
1180 (UNSPEC_SQSHRUN "") (UNSPEC_SQRSHRUN "r")
kono
parents:
diff changeset
1181 (UNSPEC_SQSHRN "") (UNSPEC_UQSHRN "")
kono
parents:
diff changeset
1182 (UNSPEC_SQRSHRN "r") (UNSPEC_UQRSHRN "r")
kono
parents:
diff changeset
1183 (UNSPEC_SQSHL "") (UNSPEC_UQSHL "")
kono
parents:
diff changeset
1184 (UNSPEC_SQRSHL "r")(UNSPEC_UQRSHL "r")
kono
parents:
diff changeset
1185 ])
kono
parents:
diff changeset
1186
kono
parents:
diff changeset
1187 (define_int_attr lr [(UNSPEC_SSLI "l") (UNSPEC_USLI "l")
kono
parents:
diff changeset
1188 (UNSPEC_SSRI "r") (UNSPEC_USRI "r")])
kono
parents:
diff changeset
1189
kono
parents:
diff changeset
1190 (define_int_attr u [(UNSPEC_SQSHLU "u") (UNSPEC_SQSHL "") (UNSPEC_UQSHL "")
kono
parents:
diff changeset
1191 (UNSPEC_SQSHRUN "u") (UNSPEC_SQRSHRUN "u")
kono
parents:
diff changeset
1192 (UNSPEC_SQSHRN "") (UNSPEC_UQSHRN "")
kono
parents:
diff changeset
1193 (UNSPEC_SQRSHRN "") (UNSPEC_UQRSHRN "")])
kono
parents:
diff changeset
1194
kono
parents:
diff changeset
1195 (define_int_attr addsub [(UNSPEC_SHADD "add")
kono
parents:
diff changeset
1196 (UNSPEC_UHADD "add")
kono
parents:
diff changeset
1197 (UNSPEC_SRHADD "add")
kono
parents:
diff changeset
1198 (UNSPEC_URHADD "add")
kono
parents:
diff changeset
1199 (UNSPEC_SHSUB "sub")
kono
parents:
diff changeset
1200 (UNSPEC_UHSUB "sub")
kono
parents:
diff changeset
1201 (UNSPEC_SRHSUB "sub")
kono
parents:
diff changeset
1202 (UNSPEC_URHSUB "sub")
kono
parents:
diff changeset
1203 (UNSPEC_ADDHN "add")
kono
parents:
diff changeset
1204 (UNSPEC_SUBHN "sub")
kono
parents:
diff changeset
1205 (UNSPEC_RADDHN "add")
kono
parents:
diff changeset
1206 (UNSPEC_RSUBHN "sub")
kono
parents:
diff changeset
1207 (UNSPEC_ADDHN2 "add")
kono
parents:
diff changeset
1208 (UNSPEC_SUBHN2 "sub")
kono
parents:
diff changeset
1209 (UNSPEC_RADDHN2 "add")
kono
parents:
diff changeset
1210 (UNSPEC_RSUBHN2 "sub")])
kono
parents:
diff changeset
1211
kono
parents:
diff changeset
1212 (define_int_attr offsetlr [(UNSPEC_SSLI "") (UNSPEC_USLI "")
kono
parents:
diff changeset
1213 (UNSPEC_SSRI "offset_")
kono
parents:
diff changeset
1214 (UNSPEC_USRI "offset_")])
kono
parents:
diff changeset
1215
kono
parents:
diff changeset
1216 ;; Standard pattern names for floating-point rounding instructions.
kono
parents:
diff changeset
1217 (define_int_attr frint_pattern [(UNSPEC_FRINTZ "btrunc")
kono
parents:
diff changeset
1218 (UNSPEC_FRINTP "ceil")
kono
parents:
diff changeset
1219 (UNSPEC_FRINTM "floor")
kono
parents:
diff changeset
1220 (UNSPEC_FRINTI "nearbyint")
kono
parents:
diff changeset
1221 (UNSPEC_FRINTX "rint")
kono
parents:
diff changeset
1222 (UNSPEC_FRINTA "round")
kono
parents:
diff changeset
1223 (UNSPEC_FRINTN "frintn")])
kono
parents:
diff changeset
1224
kono
parents:
diff changeset
1225 ;; frint suffix for floating-point rounding instructions.
kono
parents:
diff changeset
1226 (define_int_attr frint_suffix [(UNSPEC_FRINTZ "z") (UNSPEC_FRINTP "p")
kono
parents:
diff changeset
1227 (UNSPEC_FRINTM "m") (UNSPEC_FRINTI "i")
kono
parents:
diff changeset
1228 (UNSPEC_FRINTX "x") (UNSPEC_FRINTA "a")
kono
parents:
diff changeset
1229 (UNSPEC_FRINTN "n")])
kono
parents:
diff changeset
1230
kono
parents:
diff changeset
1231 (define_int_attr fcvt_pattern [(UNSPEC_FRINTZ "btrunc") (UNSPEC_FRINTA "round")
kono
parents:
diff changeset
1232 (UNSPEC_FRINTP "ceil") (UNSPEC_FRINTM "floor")
kono
parents:
diff changeset
1233 (UNSPEC_FRINTN "frintn")])
kono
parents:
diff changeset
1234
kono
parents:
diff changeset
1235 (define_int_attr fcvt_fixed_insn [(UNSPEC_SCVTF "scvtf")
kono
parents:
diff changeset
1236 (UNSPEC_UCVTF "ucvtf")
kono
parents:
diff changeset
1237 (UNSPEC_FCVTZS "fcvtzs")
kono
parents:
diff changeset
1238 (UNSPEC_FCVTZU "fcvtzu")])
kono
parents:
diff changeset
1239
kono
parents:
diff changeset
1240 ;; Pointer authentication mnemonic prefix.
kono
parents:
diff changeset
1241 (define_int_attr pauth_mnem_prefix [(UNSPEC_PACISP "paci")
kono
parents:
diff changeset
1242 (UNSPEC_AUTISP "auti")
kono
parents:
diff changeset
1243 (UNSPEC_PACI1716 "paci")
kono
parents:
diff changeset
1244 (UNSPEC_AUTI1716 "auti")])
kono
parents:
diff changeset
1245
kono
parents:
diff changeset
1246 ;; Pointer authentication HINT number for NOP space instructions using A Key.
kono
parents:
diff changeset
1247 (define_int_attr pauth_hint_num_a [(UNSPEC_PACISP "25")
kono
parents:
diff changeset
1248 (UNSPEC_AUTISP "29")
kono
parents:
diff changeset
1249 (UNSPEC_PACI1716 "8")
kono
parents:
diff changeset
1250 (UNSPEC_AUTI1716 "12")])
kono
parents:
diff changeset
1251
kono
parents:
diff changeset
1252 (define_int_attr perm_insn [(UNSPEC_ZIP1 "zip") (UNSPEC_ZIP2 "zip")
kono
parents:
diff changeset
1253 (UNSPEC_TRN1 "trn") (UNSPEC_TRN2 "trn")
kono
parents:
diff changeset
1254 (UNSPEC_UZP1 "uzp") (UNSPEC_UZP2 "uzp")])
kono
parents:
diff changeset
1255
kono
parents:
diff changeset
1256 ; op code for REV instructions (size within which elements are reversed).
kono
parents:
diff changeset
1257 (define_int_attr rev_op [(UNSPEC_REV64 "64") (UNSPEC_REV32 "32")
kono
parents:
diff changeset
1258 (UNSPEC_REV16 "16")])
kono
parents:
diff changeset
1259
kono
parents:
diff changeset
1260 (define_int_attr perm_hilo [(UNSPEC_ZIP1 "1") (UNSPEC_ZIP2 "2")
kono
parents:
diff changeset
1261 (UNSPEC_TRN1 "1") (UNSPEC_TRN2 "2")
kono
parents:
diff changeset
1262 (UNSPEC_UZP1 "1") (UNSPEC_UZP2 "2")])
kono
parents:
diff changeset
1263
kono
parents:
diff changeset
1264 (define_int_attr frecp_suffix [(UNSPEC_FRECPE "e") (UNSPEC_FRECPX "x")])
kono
parents:
diff changeset
1265
kono
parents:
diff changeset
1266 (define_int_attr crc_variant [(UNSPEC_CRC32B "crc32b") (UNSPEC_CRC32H "crc32h")
kono
parents:
diff changeset
1267 (UNSPEC_CRC32W "crc32w") (UNSPEC_CRC32X "crc32x")
kono
parents:
diff changeset
1268 (UNSPEC_CRC32CB "crc32cb") (UNSPEC_CRC32CH "crc32ch")
kono
parents:
diff changeset
1269 (UNSPEC_CRC32CW "crc32cw") (UNSPEC_CRC32CX "crc32cx")])
kono
parents:
diff changeset
1270
kono
parents:
diff changeset
1271 (define_int_attr crc_mode [(UNSPEC_CRC32B "QI") (UNSPEC_CRC32H "HI")
kono
parents:
diff changeset
1272 (UNSPEC_CRC32W "SI") (UNSPEC_CRC32X "DI")
kono
parents:
diff changeset
1273 (UNSPEC_CRC32CB "QI") (UNSPEC_CRC32CH "HI")
kono
parents:
diff changeset
1274 (UNSPEC_CRC32CW "SI") (UNSPEC_CRC32CX "DI")])
kono
parents:
diff changeset
1275
kono
parents:
diff changeset
1276 (define_int_attr aes_op [(UNSPEC_AESE "e") (UNSPEC_AESD "d")])
kono
parents:
diff changeset
1277 (define_int_attr aesmc_op [(UNSPEC_AESMC "mc") (UNSPEC_AESIMC "imc")])
kono
parents:
diff changeset
1278
kono
parents:
diff changeset
1279 (define_int_attr sha1_op [(UNSPEC_SHA1C "c") (UNSPEC_SHA1P "p")
kono
parents:
diff changeset
1280 (UNSPEC_SHA1M "m")])
kono
parents:
diff changeset
1281
kono
parents:
diff changeset
1282 (define_int_attr sha256_op [(UNSPEC_SHA256H "") (UNSPEC_SHA256H2 "2")])
kono
parents:
diff changeset
1283
kono
parents:
diff changeset
1284 (define_int_attr rdma_as [(UNSPEC_SQRDMLAH "a") (UNSPEC_SQRDMLSH "s")])