1 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
< %s \
2 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
3 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
< %s
2>&1 \
4 // RUN
: | FileCheck
%s
--check-prefix
=CHECK-ERROR
5 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+sve
< %s \
6 // RUN
: | llvm-objdump
-d
-mattr
=+sve
- | FileCheck
%s
--check-prefix
=CHECK-INST
7 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+sve
< %s \
8 // RUN
: | llvm-objdump
-d
- | FileCheck
%s
--check-prefix
=CHECK-UNKNOWN
11 // CHECK-INST
: mov z0.
b, p0
/m
, w0
12 // CHECK-ENCODING
: [0x00,0xa0,0x28,0x05]
13 // CHECK-ERROR
: instruction requires
: sve
14 // CHECK-UNKNOWN
: 00 a0
28 05 <unknown
>
17 // CHECK-INST
: mov z0.h
, p0
/m
, w0
18 // CHECK-ENCODING
: [0x00,0xa0,0x68,0x05]
19 // CHECK-ERROR
: instruction requires
: sve
20 // CHECK-UNKNOWN
: 00 a0
68 05 <unknown
>
23 // CHECK-INST
: mov z0.s
, p0
/m
, w0
24 // CHECK-ENCODING
: [0x00,0xa0,0xa8,0x05]
25 // CHECK-ERROR
: instruction requires
: sve
26 // CHECK-UNKNOWN
: 00 a0 a8
05 <unknown
>
29 // CHECK-INST
: mov z0.d
, p0
/m
, x0
30 // CHECK-ENCODING
: [0x00,0xa0,0xe8,0x05]
31 // CHECK-ERROR
: instruction requires
: sve
32 // CHECK-UNKNOWN
: 00 a0 e8
05 <unknown
>
35 // CHECK-INST
: mov z31.
b, p7
/m
, wsp
36 // CHECK-ENCODING
: [0xff,0xbf,0x28,0x05]
37 // CHECK-ERROR
: instruction requires
: sve
38 // CHECK-UNKNOWN
: ff
bf 28 05 <unknown
>
41 // CHECK-INST
: mov z31.h
, p7
/m
, wsp
42 // CHECK-ENCODING
: [0xff,0xbf,0x68,0x05]
43 // CHECK-ERROR
: instruction requires
: sve
44 // CHECK-UNKNOWN
: ff
bf 68 05 <unknown
>
47 // CHECK-INST
: mov z31.s
, p7
/m
, wsp
48 // CHECK-ENCODING
: [0xff,0xbf,0xa8,0x05]
49 // CHECK-ERROR
: instruction requires
: sve
50 // CHECK-UNKNOWN
: ff
bf a8
05 <unknown
>
53 // CHECK-INST
: mov z31.d
, p7
/m
, sp
54 // CHECK-ENCODING
: [0xff,0xbf,0xe8,0x05]
55 // CHECK-ERROR
: instruction requires
: sve
56 // CHECK-UNKNOWN
: ff
bf e8
05 <unknown
>
59 // CHECK-INST
: mov z0.
b, p0
/m
, b0
60 // CHECK-ENCODING
: [0x00,0x80,0x20,0x05]
61 // CHECK-ERROR
: instruction requires
: sve
62 // CHECK-UNKNOWN
: 00 80 20 05 <unknown
>
65 // CHECK-INST
: mov z31.
b, p7
/m
, b31
66 // CHECK-ENCODING
: [0xff,0x9f,0x20,0x05]
67 // CHECK-ERROR
: instruction requires
: sve
68 // CHECK-UNKNOWN
: ff
9f
20 05 <unknown
>
71 // CHECK-INST
: mov z0.h
, p0
/m
, h0
72 // CHECK-ENCODING
: [0x00,0x80,0x60,0x05]
73 // CHECK-ERROR
: instruction requires
: sve
74 // CHECK-UNKNOWN
: 00 80 60 05 <unknown
>
77 // CHECK-INST
: mov z31.h
, p7
/m
, h31
78 // CHECK-ENCODING
: [0xff,0x9f,0x60,0x05]
79 // CHECK-ERROR
: instruction requires
: sve
80 // CHECK-UNKNOWN
: ff
9f
60 05 <unknown
>
83 // CHECK-INST
: mov z0.s
, p0
/m
, s0
84 // CHECK-ENCODING
: [0x00,0x80,0xa0,0x05]
85 // CHECK-ERROR
: instruction requires
: sve
86 // CHECK-UNKNOWN
: 00 80 a0
05 <unknown
>
89 // CHECK-INST
: mov z31.s
, p7
/m
, s31
90 // CHECK-ENCODING
: [0xff,0x9f,0xa0,0x05]
91 // CHECK-ERROR
: instruction requires
: sve
92 // CHECK-UNKNOWN
: ff
9f a0
05 <unknown
>
95 // CHECK-INST
: mov z0.d
, p0
/m
, d0
96 // CHECK-ENCODING
: [0x00,0x80,0xe0,0x05]
97 // CHECK-ERROR
: instruction requires
: sve
98 // CHECK-UNKNOWN
: 00 80 e0
05 <unknown
>
101 // CHECK-INST
: mov z31.d
, p7
/m
, d31
102 // CHECK-ENCODING
: [0xff,0x9f,0xe0,0x05]
103 // CHECK-ERROR
: instruction requires
: sve
104 // CHECK-UNKNOWN
: ff
9f e0
05 <unknown
>
106 cpy z5.
b, p0
/z
, #-128
107 // CHECK-INST
: mov z5.
b, p0
/z
, #-128
108 // CHECK-ENCODING
: [0x05,0x10,0x10,0x05]
109 // CHECK-ERROR
: instruction requires
: sve
110 // CHECK-UNKNOWN
: 05 10 10 05 <unknown
>
113 // CHECK-INST
: mov z5.
b, p0
/z
, #127
114 // CHECK-ENCODING
: [0xe5,0x0f,0x10,0x05]
115 // CHECK-ERROR
: instruction requires
: sve
116 // CHECK-UNKNOWN
: e5
0f
10 05 <unknown
>
119 // CHECK-INST
: mov z5.
b, p0
/z
, #-1
120 // CHECK-ENCODING
: [0xe5,0x1f,0x10,0x05]
121 // CHECK-ERROR
: instruction requires
: sve
122 // CHECK-UNKNOWN
: e5
1f
10 05 <unknown
>
124 cpy z21.h
, p0
/z
, #-128
125 // CHECK-INST
: mov z21.h
, p0
/z
, #-128
126 // CHECK-ENCODING
: [0x15,0x10,0x50,0x05]
127 // CHECK-ERROR
: instruction requires
: sve
128 // CHECK-UNKNOWN
: 15 10 50 05 <unknown
>
130 cpy z21.h
, p0
/z
, #-128, lsl #8
131 // CHECK-INST
: mov z21.h
, p0
/z
, #-32768
132 // CHECK-ENCODING
: [0x15,0x30,0x50,0x05]
133 // CHECK-ERROR
: instruction requires
: sve
134 // CHECK-UNKNOWN
: 15 30 50 05 <unknown
>
136 cpy z21.h
, p0
/z
, #-32768
137 // CHECK-INST
: mov z21.h
, p0
/z
, #-32768
138 // CHECK-ENCODING
: [0x15,0x30,0x50,0x05]
139 // CHECK-ERROR
: instruction requires
: sve
140 // CHECK-UNKNOWN
: 15 30 50 05 <unknown
>
142 cpy z21.h
, p0
/z
, #127
143 // CHECK-INST
: mov z21.h
, p0
/z
, #127
144 // CHECK-ENCODING
: [0xf5,0x0f,0x50,0x05]
145 // CHECK-ERROR
: instruction requires
: sve
146 // CHECK-UNKNOWN
: f5 0f
50 05 <unknown
>
148 cpy z21.h
, p0
/z
, #127, lsl #8
149 // CHECK-INST
: mov z21.h
, p0
/z
, #32512
150 // CHECK-ENCODING
: [0xf5,0x2f,0x50,0x05]
151 // CHECK-ERROR
: instruction requires
: sve
152 // CHECK-UNKNOWN
: f5 2f
50 05 <unknown
>
154 cpy z21.h
, p0
/z
, #32512
155 // CHECK-INST
: mov z21.h
, p0
/z
, #32512
156 // CHECK-ENCODING
: [0xf5,0x2f,0x50,0x05]
157 // CHECK-ERROR
: instruction requires
: sve
158 // CHECK-UNKNOWN
: f5 2f
50 05 <unknown
>
160 cpy z21.s
, p0
/z
, #-128
161 // CHECK-INST
: mov z21.s
, p0
/z
, #-128
162 // CHECK-ENCODING
: [0x15,0x10,0x90,0x05]
163 // CHECK-ERROR
: instruction requires
: sve
164 // CHECK-UNKNOWN
: 15 10 90 05 <unknown
>
166 cpy z21.s
, p0
/z
, #-128, lsl #8
167 // CHECK-INST
: mov z21.s
, p0
/z
, #-32768
168 // CHECK-ENCODING
: [0x15,0x30,0x90,0x05]
169 // CHECK-ERROR
: instruction requires
: sve
170 // CHECK-UNKNOWN
: 15 30 90 05 <unknown
>
172 cpy z21.s
, p0
/z
, #-32768
173 // CHECK-INST
: mov z21.s
, p0
/z
, #-32768
174 // CHECK-ENCODING
: [0x15,0x30,0x90,0x05]
175 // CHECK-ERROR
: instruction requires
: sve
176 // CHECK-UNKNOWN
: 15 30 90 05 <unknown
>
178 cpy z21.s
, p0
/z
, #127
179 // CHECK-INST
: mov z21.s
, p0
/z
, #127
180 // CHECK-ENCODING
: [0xf5,0x0f,0x90,0x05]
181 // CHECK-ERROR
: instruction requires
: sve
182 // CHECK-UNKNOWN
: f5 0f
90 05 <unknown
>
184 cpy z21.s
, p0
/z
, #127, lsl #8
185 // CHECK-INST
: mov z21.s
, p0
/z
, #32512
186 // CHECK-ENCODING
: [0xf5,0x2f,0x90,0x05]
187 // CHECK-ERROR
: instruction requires
: sve
188 // CHECK-UNKNOWN
: f5 2f
90 05 <unknown
>
190 cpy z21.s
, p0
/z
, #32512
191 // CHECK-INST
: mov z21.s
, p0
/z
, #32512
192 // CHECK-ENCODING
: [0xf5,0x2f,0x90,0x05]
193 // CHECK-ERROR
: instruction requires
: sve
194 // CHECK-UNKNOWN
: f5 2f
90 05 <unknown
>
196 cpy z21.d
, p0
/z
, #-128
197 // CHECK-INST
: mov z21.d
, p0
/z
, #-128
198 // CHECK-ENCODING
: [0x15,0x10,0xd0,0x05]
199 // CHECK-ERROR
: instruction requires
: sve
200 // CHECK-UNKNOWN
: 15 10 d0
05 <unknown
>
202 cpy z21.d
, p0
/z
, #-128, lsl #8
203 // CHECK-INST
: mov z21.d
, p0
/z
, #-32768
204 // CHECK-ENCODING
: [0x15,0x30,0xd0,0x05]
205 // CHECK-ERROR
: instruction requires
: sve
206 // CHECK-UNKNOWN
: 15 30 d0
05 <unknown
>
208 cpy z21.d
, p0
/z
, #-32768
209 // CHECK-INST
: mov z21.d
, p0
/z
, #-32768
210 // CHECK-ENCODING
: [0x15,0x30,0xd0,0x05]
211 // CHECK-ERROR
: instruction requires
: sve
212 // CHECK-UNKNOWN
: 15 30 d0
05 <unknown
>
214 cpy z21.d
, p0
/z
, #127
215 // CHECK-INST
: mov z21.d
, p0
/z
, #127
216 // CHECK-ENCODING
: [0xf5,0x0f,0xd0,0x05]
217 // CHECK-ERROR
: instruction requires
: sve
218 // CHECK-UNKNOWN
: f5 0f d0
05 <unknown
>
220 cpy z21.d
, p0
/z
, #127, lsl #8
221 // CHECK-INST
: mov z21.d
, p0
/z
, #32512
222 // CHECK-ENCODING
: [0xf5,0x2f,0xd0,0x05]
223 // CHECK-ERROR
: instruction requires
: sve
224 // CHECK-UNKNOWN
: f5 2f d0
05 <unknown
>
226 cpy z21.d
, p0
/z
, #32512
227 // CHECK-INST
: mov z21.d
, p0
/z
, #32512
228 // CHECK-ENCODING
: [0xf5,0x2f,0xd0,0x05]
229 // CHECK-ERROR
: instruction requires
: sve
230 // CHECK-UNKNOWN
: f5 2f d0
05 <unknown
>
233 // --------------------------------------------------------------------------//
234 // Tests for merging variant
(/m
) and testing the range of predicate
(> 7)
237 cpy z5.
b, p15
/m
, #-128
238 // CHECK-INST
: mov z5.
b, p15
/m
, #-128
239 // CHECK-ENCODING
: [0x05,0x50,0x1f,0x05]
240 // CHECK-ERROR
: instruction requires
: sve
241 // CHECK-UNKNOWN
: 05 50 1f
05 <unknown
>
243 cpy z21.h
, p15
/m
, #-128
244 // CHECK-INST
: mov z21.h
, p15
/m
, #-128
245 // CHECK-ENCODING
: [0x15,0x50,0x5f,0x05]
246 // CHECK-ERROR
: instruction requires
: sve
247 // CHECK-UNKNOWN
: 15 50 5f
05 <unknown
>
249 cpy z21.h
, p15
/m
, #-128, lsl #8
250 // CHECK-INST
: mov z21.h
, p15
/m
, #-32768
251 // CHECK-ENCODING
: [0x15,0x70,0x5f,0x05]
252 // CHECK-ERROR
: instruction requires
: sve
253 // CHECK-UNKNOWN
: 15 70 5f
05 <unknown
>
255 cpy z21.s
, p15
/m
, #-128
256 // CHECK-INST
: mov z21.s
, p15
/m
, #-128
257 // CHECK-ENCODING
: [0x15,0x50,0x9f,0x05]
258 // CHECK-ERROR
: instruction requires
: sve
259 // CHECK-UNKNOWN
: 15 50 9f
05 <unknown
>
261 cpy z21.s
, p15
/m
, #-128, lsl #8
262 // CHECK-INST
: mov z21.s
, p15
/m
, #-32768
263 // CHECK-ENCODING
: [0x15,0x70,0x9f,0x05]
264 // CHECK-ERROR
: instruction requires
: sve
265 // CHECK-UNKNOWN
: 15 70 9f
05 <unknown
>
267 cpy z21.d
, p15
/m
, #-128
268 // CHECK-INST
: mov z21.d
, p15
/m
, #-128
269 // CHECK-ENCODING
: [0x15,0x50,0xdf,0x05]
270 // CHECK-ERROR
: instruction requires
: sve
271 // CHECK-UNKNOWN
: 15 50 df
05 <unknown
>
273 cpy z21.d
, p15
/m
, #-128, lsl #8
274 // CHECK-INST
: mov z21.d
, p15
/m
, #-32768
275 // CHECK-ENCODING
: [0x15,0x70,0xdf,0x05]
276 // CHECK-ERROR
: instruction requires
: sve
277 // CHECK-UNKNOWN
: 15 70 df
05 <unknown
>
280 // --------------------------------------------------------------------------//
281 // Test compatibility with MOVPRFX instruction.
283 movprfx z31.d
, p7
/z
, z6.d
284 // CHECK-INST
: movprfx z31.d
, p7
/z
, z6.d
285 // CHECK-ENCODING
: [0xdf,0x3c,0xd0,0x04]
286 // CHECK-ERROR
: instruction requires
: sve
287 // CHECK-UNKNOWN
: df
3c d0
04 <unknown
>
290 // CHECK-INST
: mov z31.d
, p7
/m
, sp
291 // CHECK-ENCODING
: [0xff,0xbf,0xe8,0x05]
292 // CHECK-ERROR
: instruction requires
: sve
293 // CHECK-UNKNOWN
: ff
bf e8
05 <unknown
>
296 // CHECK-INST
: movprfx z31
, z6
297 // CHECK-ENCODING
: [0xdf,0xbc,0x20,0x04]
298 // CHECK-ERROR
: instruction requires
: sve
299 // CHECK-UNKNOWN
: df
bc 20 04 <unknown
>
302 // CHECK-INST
: mov z31.d
, p7
/m
, sp
303 // CHECK-ENCODING
: [0xff,0xbf,0xe8,0x05]
304 // CHECK-ERROR
: instruction requires
: sve
305 // CHECK-UNKNOWN
: ff
bf e8
05 <unknown
>
307 movprfx z21.d
, p7
/z
, z28.d
308 // CHECK-INST
: movprfx z21.d
, p7
/z
, z28.d
309 // CHECK-ENCODING
: [0x95,0x3f,0xd0,0x04]
310 // CHECK-ERROR
: instruction requires
: sve
311 // CHECK-UNKNOWN
: 95 3f d0
04 <unknown
>
313 cpy z21.d
, p7
/m
, #-128, lsl #8
314 // CHECK-INST
: mov z21.d
, p7
/m
, #-32768
315 // CHECK-ENCODING
: [0x15,0x70,0xd7,0x05]
316 // CHECK-ERROR
: instruction requires
: sve
317 // CHECK-UNKNOWN
: 15 70 d7
05 <unknown
>
320 // CHECK-INST
: movprfx z21
, z28
321 // CHECK-ENCODING
: [0x95,0xbf,0x20,0x04]
322 // CHECK-ERROR
: instruction requires
: sve
323 // CHECK-UNKNOWN
: 95 bf 20 04 <unknown
>
325 cpy z21.d
, p15
/m
, #-128, lsl #8
326 // CHECK-INST
: mov z21.d
, p15
/m
, #-32768
327 // CHECK-ENCODING
: [0x15,0x70,0xdf,0x05]
328 // CHECK-ERROR
: instruction requires
: sve
329 // CHECK-UNKNOWN
: 15 70 df
05 <unknown
>
331 movprfx z4.d
, p7
/z
, z6.d
332 // CHECK-INST
: movprfx z4.d
, p7
/z
, z6.d
333 // CHECK-ENCODING
: [0xc4,0x3c,0xd0,0x04]
334 // CHECK-ERROR
: instruction requires
: sve
335 // CHECK-UNKNOWN
: c4
3c d0
04 <unknown
>
338 // CHECK-INST
: mov z4.d
, p7
/m
, d31
339 // CHECK-ENCODING
: [0xe4,0x9f,0xe0,0x05]
340 // CHECK-ERROR
: instruction requires
: sve
341 // CHECK-UNKNOWN
: e4
9f e0
05 <unknown
>
344 // CHECK-INST
: movprfx z4
, z6
345 // CHECK-ENCODING
: [0xc4,0xbc,0x20,0x04]
346 // CHECK-ERROR
: instruction requires
: sve
347 // CHECK-UNKNOWN
: c4
bc 20 04 <unknown
>
350 // CHECK-INST
: mov z4.d
, p7
/m
, d31
351 // CHECK-ENCODING
: [0xe4,0x9f,0xe0,0x05]
352 // CHECK-ERROR
: instruction requires
: sve
353 // CHECK-UNKNOWN
: e4
9f e0
05 <unknown
>