xref: /llvm-project/llvm/test/MC/AArch64/SVE/mov.s (revision 75cdab6dc2453a508157a9c383b93373a93078d6)
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
4// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
5// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
6// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
8// RUN:        | llvm-objdump --no-print-imm-hex -d --mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST
9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \
10// RUN:   | llvm-objdump --no-print-imm-hex -d --mattr=-sve - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11
12mov     z0.b, w0
13// CHECK-INST: mov     z0.b, w0
14// CHECK-ENCODING: [0x00,0x38,0x20,0x05]
15// CHECK-ERROR: instruction requires: sve or sme
16// CHECK-UNKNOWN: 05203800 <unknown>
17
18mov     z0.h, w0
19// CHECK-INST: mov     z0.h, w0
20// CHECK-ENCODING: [0x00,0x38,0x60,0x05]
21// CHECK-ERROR: instruction requires: sve or sme
22// CHECK-UNKNOWN: 05603800 <unknown>
23
24mov     z0.s, w0
25// CHECK-INST: mov     z0.s, w0
26// CHECK-ENCODING: [0x00,0x38,0xa0,0x05]
27// CHECK-ERROR: instruction requires: sve or sme
28// CHECK-UNKNOWN: 05a03800 <unknown>
29
30mov     z0.d, x0
31// CHECK-INST: mov     z0.d, x0
32// CHECK-ENCODING: [0x00,0x38,0xe0,0x05]
33// CHECK-ERROR: instruction requires: sve or sme
34// CHECK-UNKNOWN: 05e03800 <unknown>
35
36mov     z31.h, wsp
37// CHECK-INST: mov     z31.h, wsp
38// CHECK-ENCODING: [0xff,0x3b,0x60,0x05]
39// CHECK-ERROR: instruction requires: sve or sme
40// CHECK-UNKNOWN: 05603bff <unknown>
41
42mov     z31.s, wsp
43// CHECK-INST: mov     z31.s, wsp
44// CHECK-ENCODING: [0xff,0x3b,0xa0,0x05]
45// CHECK-ERROR: instruction requires: sve or sme
46// CHECK-UNKNOWN: 05a03bff <unknown>
47
48mov     z31.d, sp
49// CHECK-INST: mov     z31.d, sp
50// CHECK-ENCODING: [0xff,0x3b,0xe0,0x05]
51// CHECK-ERROR: instruction requires: sve or sme
52// CHECK-UNKNOWN: 05e03bff <unknown>
53
54mov     z31.b, wsp
55// CHECK-INST: mov     z31.b, wsp
56// CHECK-ENCODING: [0xff,0x3b,0x20,0x05]
57// CHECK-ERROR: instruction requires: sve or sme
58// CHECK-UNKNOWN: 05203bff <unknown>
59
60mov     z0.d, z0.d
61// CHECK-INST: mov     z0.d, z0.d
62// CHECK-ENCODING: [0x00,0x30,0x60,0x04]
63// CHECK-ERROR: instruction requires: sve or sme
64// CHECK-UNKNOWN: 04603000 <unknown>
65
66mov     z31.d, z0.d
67// CHECK-INST: mov     z31.d, z0.d
68// CHECK-ENCODING: [0x1f,0x30,0x60,0x04]
69// CHECK-ERROR: instruction requires: sve or sme
70// CHECK-UNKNOWN: 0460301f <unknown>
71
72mov     z5.b, #-128
73// CHECK-INST: mov     z5.b, #-128
74// CHECK-ENCODING: [0x05,0xd0,0x38,0x25]
75// CHECK-ERROR: instruction requires: sve or sme
76// CHECK-UNKNOWN: 2538d005 <unknown>
77
78mov     z5.b, #127
79// CHECK-INST: mov     z5.b, #127
80// CHECK-ENCODING: [0xe5,0xcf,0x38,0x25]
81// CHECK-ERROR: instruction requires: sve or sme
82// CHECK-UNKNOWN: 2538cfe5 <unknown>
83
84mov     z5.b, #255
85// CHECK-INST: mov     z5.b, #-1
86// CHECK-ENCODING: [0xe5,0xdf,0x38,0x25]
87// CHECK-ERROR: instruction requires: sve or sme
88// CHECK-UNKNOWN: 2538dfe5 <unknown>
89
90mov     z21.h, #-128
91// CHECK-INST: mov     z21.h, #-128
92// CHECK-ENCODING: [0x15,0xd0,0x78,0x25]
93// CHECK-ERROR: instruction requires: sve or sme
94// CHECK-UNKNOWN: 2578d015 <unknown>
95
96mov     z21.h, #-128, lsl #8
97// CHECK-INST: mov     z21.h, #-32768
98// CHECK-ENCODING: [0x15,0xf0,0x78,0x25]
99// CHECK-ERROR: instruction requires: sve or sme
100// CHECK-UNKNOWN: 2578f015 <unknown>
101
102mov     z21.h, #-32768
103// CHECK-INST: mov     z21.h, #-32768
104// CHECK-ENCODING: [0x15,0xf0,0x78,0x25]
105// CHECK-ERROR: instruction requires: sve or sme
106// CHECK-UNKNOWN: 2578f015 <unknown>
107
108mov     z21.h, #127
109// CHECK-INST: mov     z21.h, #127
110// CHECK-ENCODING: [0xf5,0xcf,0x78,0x25]
111// CHECK-ERROR: instruction requires: sve or sme
112// CHECK-UNKNOWN: 2578cff5 <unknown>
113
114mov     z21.h, #127, lsl #8
115// CHECK-INST: mov     z21.h, #32512
116// CHECK-ENCODING: [0xf5,0xef,0x78,0x25]
117// CHECK-ERROR: instruction requires: sve or sme
118// CHECK-UNKNOWN: 2578eff5 <unknown>
119
120mov     z21.h, #32512
121// CHECK-INST: mov     z21.h, #32512
122// CHECK-ENCODING: [0xf5,0xef,0x78,0x25]
123// CHECK-ERROR: instruction requires: sve or sme
124// CHECK-UNKNOWN: 2578eff5 <unknown>
125
126mov     z21.s, #-128
127// CHECK-INST: mov     z21.s, #-128
128// CHECK-ENCODING: [0x15,0xd0,0xb8,0x25]
129// CHECK-ERROR: instruction requires: sve or sme
130// CHECK-UNKNOWN: 25b8d015 <unknown>
131
132mov     z21.s, #-128, lsl #8
133// CHECK-INST: mov     z21.s, #-32768
134// CHECK-ENCODING: [0x15,0xf0,0xb8,0x25]
135// CHECK-ERROR: instruction requires: sve or sme
136// CHECK-UNKNOWN: 25b8f015 <unknown>
137
138mov     z21.s, #-32768
139// CHECK-INST: mov     z21.s, #-32768
140// CHECK-ENCODING: [0x15,0xf0,0xb8,0x25]
141// CHECK-ERROR: instruction requires: sve or sme
142// CHECK-UNKNOWN: 25b8f015 <unknown>
143
144mov     z21.s, #127
145// CHECK-INST: mov     z21.s, #127
146// CHECK-ENCODING: [0xf5,0xcf,0xb8,0x25]
147// CHECK-ERROR: instruction requires: sve or sme
148// CHECK-UNKNOWN: 25b8cff5 <unknown>
149
150mov     z21.s, #127, lsl #8
151// CHECK-INST: mov     z21.s, #32512
152// CHECK-ENCODING: [0xf5,0xef,0xb8,0x25]
153// CHECK-ERROR: instruction requires: sve or sme
154// CHECK-UNKNOWN: 25b8eff5 <unknown>
155
156mov     z21.s, #32512
157// CHECK-INST: mov     z21.s, #32512
158// CHECK-ENCODING: [0xf5,0xef,0xb8,0x25]
159// CHECK-ERROR: instruction requires: sve or sme
160// CHECK-UNKNOWN: 25b8eff5 <unknown>
161
162mov     z21.d, #-128
163// CHECK-INST: mov     z21.d, #-128
164// CHECK-ENCODING: [0x15,0xd0,0xf8,0x25]
165// CHECK-ERROR: instruction requires: sve or sme
166// CHECK-UNKNOWN: 25f8d015 <unknown>
167
168mov     z21.d, #-128, lsl #8
169// CHECK-INST: mov     z21.d, #-32768
170// CHECK-ENCODING: [0x15,0xf0,0xf8,0x25]
171// CHECK-ERROR: instruction requires: sve or sme
172// CHECK-UNKNOWN: 25f8f015 <unknown>
173
174mov     z21.d, #-32768
175// CHECK-INST: mov     z21.d, #-32768
176// CHECK-ENCODING: [0x15,0xf0,0xf8,0x25]
177// CHECK-ERROR: instruction requires: sve or sme
178// CHECK-UNKNOWN: 25f8f015 <unknown>
179
180mov     z21.d, #127
181// CHECK-INST: mov     z21.d, #127
182// CHECK-ENCODING: [0xf5,0xcf,0xf8,0x25]
183// CHECK-ERROR: instruction requires: sve or sme
184// CHECK-UNKNOWN: 25f8cff5 <unknown>
185
186mov     z21.d, #127, lsl #8
187// CHECK-INST: mov     z21.d, #32512
188// CHECK-ENCODING: [0xf5,0xef,0xf8,0x25]
189// CHECK-ERROR: instruction requires: sve or sme
190// CHECK-UNKNOWN: 25f8eff5 <unknown>
191
192mov     z21.d, #32512
193// CHECK-INST: mov     z21.d, #32512
194// CHECK-ENCODING: [0xf5,0xef,0xf8,0x25]
195// CHECK-ERROR: instruction requires: sve or sme
196// CHECK-UNKNOWN: 25f8eff5 <unknown>
197
198mov     z0.h, #32768
199// CHECK-INST: mov    z0.h, #-32768
200// CHECK-ENCODING: [0x00,0xf0,0x78,0x25]
201// CHECK-ERROR: instruction requires: sve or sme
202// CHECK-UNKNOWN: 2578f000 <unknown>
203
204mov     z0.h, #65280
205// CHECK-INST: mov    z0.h, #-256
206// CHECK-ENCODING: [0xe0,0xff,0x78,0x25]
207// CHECK-ERROR: instruction requires: sve or sme
208// CHECK-UNKNOWN: 2578ffe0 <unknown>
209
210mov     z0.h, #-33024
211// CHECK-INST: mov z0.h, #32512
212// CHECK-ENCODING: [0xe0,0xef,0x78,0x25]
213// CHECK-ERROR: instruction requires: sve or sme
214// CHECK-UNKNOWN: 2578efe0 <unknown>
215
216mov     z0.h, #-32769
217// CHECK-INST: mov z0.h, #32767
218// CHECK-ENCODING: [0xc0,0x05,0xc0,0x05]
219// CHECK-ERROR: instruction requires: sve or sme
220// CHECK-UNKNOWN: 05c005c0 <unknown>
221
222mov     z0.s, #-32769
223// CHECK-INST: mov     z0.s, #0xffff7fff
224// CHECK-ENCODING: [0xc0,0x83,0xc0,0x05]
225// CHECK-ERROR: instruction requires: sve or sme
226// CHECK-UNKNOWN: 05c083c0 <unknown>
227
228mov     z0.s, #32768
229// CHECK-INST: mov     z0.s, #32768
230// CHECK-ENCODING: [0x00,0x88,0xc0,0x05]
231// CHECK-ERROR: instruction requires: sve or sme
232// CHECK-UNKNOWN: 05c08800 <unknown>
233
234mov     z0.d, #-32769
235// CHECK-INST: mov     z0.d, #0xffffffffffff7fff
236// CHECK-ENCODING: [0xc0,0x87,0xc3,0x05]
237// CHECK-ERROR: instruction requires: sve or sme
238// CHECK-UNKNOWN: 05c387c0 <unknown>
239
240mov     z0.d, #32768
241// CHECK-INST: mov     z0.d, #32768
242// CHECK-ENCODING: [0x00,0x88,0xc3,0x05]
243// CHECK-ERROR: instruction requires: sve or sme
244// CHECK-UNKNOWN: 05c38800 <unknown>
245
246mov     z0.d, #0xe0000000000003ff
247// CHECK-INST: mov     z0.d, #0xe0000000000003ff
248// CHECK-ENCODING: [0x80,0x19,0xc2,0x05]
249// CHECK-ERROR: instruction requires: sve or sme
250// CHECK-UNKNOWN: 05c21980 <unknown>
251
252mov     z5.b, p0/z, #-128
253// CHECK-INST: mov     z5.b, p0/z, #-128
254// CHECK-ENCODING: [0x05,0x10,0x10,0x05]
255// CHECK-ERROR: instruction requires: sve or sme
256// CHECK-UNKNOWN: 05101005  <unknown>
257
258mov     z5.b, p0/z, #127
259// CHECK-INST: mov     z5.b, p0/z, #127
260// CHECK-ENCODING: [0xe5,0x0f,0x10,0x05]
261// CHECK-ERROR: instruction requires: sve or sme
262// CHECK-UNKNOWN: 05100fe5  <unknown>
263
264mov     z5.b, p0/z, #255
265// CHECK-INST: mov     z5.b, p0/z, #-1
266// CHECK-ENCODING: [0xe5,0x1f,0x10,0x05]
267// CHECK-ERROR: instruction requires: sve or sme
268// CHECK-UNKNOWN: 05101fe5  <unknown>
269
270mov     z21.h, p0/z, #-128
271// CHECK-INST: mov     z21.h, p0/z, #-128
272// CHECK-ENCODING: [0x15,0x10,0x50,0x05]
273// CHECK-ERROR: instruction requires: sve or sme
274// CHECK-UNKNOWN: 05501015  <unknown>
275
276mov     z21.h, p0/z, #-128, lsl #8
277// CHECK-INST: mov     z21.h, p0/z, #-32768
278// CHECK-ENCODING: [0x15,0x30,0x50,0x05]
279// CHECK-ERROR: instruction requires: sve or sme
280// CHECK-UNKNOWN: 05503015  <unknown>
281
282mov     z21.h, p0/z, #-32768
283// CHECK-INST: mov     z21.h, p0/z, #-32768
284// CHECK-ENCODING: [0x15,0x30,0x50,0x05]
285// CHECK-ERROR: instruction requires: sve or sme
286// CHECK-UNKNOWN: 05503015  <unknown>
287
288mov     z21.h, p0/z, #127
289// CHECK-INST: mov     z21.h, p0/z, #127
290// CHECK-ENCODING: [0xf5,0x0f,0x50,0x05]
291// CHECK-ERROR: instruction requires: sve or sme
292// CHECK-UNKNOWN: 05500ff5  <unknown>
293
294mov     z21.h, p0/z, #127, lsl #8
295// CHECK-INST: mov     z21.h, p0/z, #32512
296// CHECK-ENCODING: [0xf5,0x2f,0x50,0x05]
297// CHECK-ERROR: instruction requires: sve or sme
298// CHECK-UNKNOWN: 05502ff5  <unknown>
299
300mov     z21.h, p0/z, #32512
301// CHECK-INST: mov     z21.h, p0/z, #32512
302// CHECK-ENCODING: [0xf5,0x2f,0x50,0x05]
303// CHECK-ERROR: instruction requires: sve or sme
304// CHECK-UNKNOWN: 05502ff5  <unknown>
305
306mov     z21.s, p0/z, #-128
307// CHECK-INST: mov     z21.s, p0/z, #-128
308// CHECK-ENCODING: [0x15,0x10,0x90,0x05]
309// CHECK-ERROR: instruction requires: sve or sme
310// CHECK-UNKNOWN: 05901015  <unknown>
311
312mov     z21.s, p0/z, #-128, lsl #8
313// CHECK-INST: mov     z21.s, p0/z, #-32768
314// CHECK-ENCODING: [0x15,0x30,0x90,0x05]
315// CHECK-ERROR: instruction requires: sve or sme
316// CHECK-UNKNOWN: 05903015  <unknown>
317
318mov     z21.s, p0/z, #-32768
319// CHECK-INST: mov     z21.s, p0/z, #-32768
320// CHECK-ENCODING: [0x15,0x30,0x90,0x05]
321// CHECK-ERROR: instruction requires: sve or sme
322// CHECK-UNKNOWN: 05903015  <unknown>
323
324mov     z21.s, p0/z, #127
325// CHECK-INST: mov     z21.s, p0/z, #127
326// CHECK-ENCODING: [0xf5,0x0f,0x90,0x05]
327// CHECK-ERROR: instruction requires: sve or sme
328// CHECK-UNKNOWN: 05900ff5  <unknown>
329
330mov     z21.s, p0/z, #127, lsl #8
331// CHECK-INST: mov     z21.s, p0/z, #32512
332// CHECK-ENCODING: [0xf5,0x2f,0x90,0x05]
333// CHECK-ERROR: instruction requires: sve or sme
334// CHECK-UNKNOWN: 05902ff5  <unknown>
335
336mov     z21.s, p0/z, #32512
337// CHECK-INST: mov     z21.s, p0/z, #32512
338// CHECK-ENCODING: [0xf5,0x2f,0x90,0x05]
339// CHECK-ERROR: instruction requires: sve or sme
340// CHECK-UNKNOWN: 05902ff5  <unknown>
341
342mov     z21.d, p0/z, #-128
343// CHECK-INST: mov     z21.d, p0/z, #-128
344// CHECK-ENCODING: [0x15,0x10,0xd0,0x05]
345// CHECK-ERROR: instruction requires: sve or sme
346// CHECK-UNKNOWN: 05d01015  <unknown>
347
348mov     z21.d, p0/z, #-128, lsl #8
349// CHECK-INST: mov     z21.d, p0/z, #-32768
350// CHECK-ENCODING: [0x15,0x30,0xd0,0x05]
351// CHECK-ERROR: instruction requires: sve or sme
352// CHECK-UNKNOWN: 05d03015  <unknown>
353
354mov     z21.d, p0/z, #-32768
355// CHECK-INST: mov     z21.d, p0/z, #-32768
356// CHECK-ENCODING: [0x15,0x30,0xd0,0x05]
357// CHECK-ERROR: instruction requires: sve or sme
358// CHECK-UNKNOWN: 05d03015  <unknown>
359
360mov     z21.d, p0/z, #127
361// CHECK-INST: mov     z21.d, p0/z, #127
362// CHECK-ENCODING: [0xf5,0x0f,0xd0,0x05]
363// CHECK-ERROR: instruction requires: sve or sme
364// CHECK-UNKNOWN: 05d00ff5  <unknown>
365
366mov     z21.d, p0/z, #127, lsl #8
367// CHECK-INST: mov     z21.d, p0/z, #32512
368// CHECK-ENCODING: [0xf5,0x2f,0xd0,0x05]
369// CHECK-ERROR: instruction requires: sve or sme
370// CHECK-UNKNOWN: 05d02ff5  <unknown>
371
372mov     z21.d, p0/z, #32512
373// CHECK-INST: mov     z21.d, p0/z, #32512
374// CHECK-ENCODING: [0xf5,0x2f,0xd0,0x05]
375// CHECK-ERROR: instruction requires: sve or sme
376// CHECK-UNKNOWN: 05d02ff5  <unknown>
377
378
379// --------------------------------------------------------------------------//
380// Tests where the negative immediate is in bounds when interpreted
381// as the element type.
382
383mov     z0.b, #-129
384// CHECK-INST: mov     z0.b, #127
385// CHECK-ENCODING: [0xe0,0xcf,0x38,0x25]
386// CHECK-ERROR: instruction requires: sve or sme
387// CHECK-UNKNOWN: 2538cfe0 <unknown>
388
389mov     z0.h, #-129, lsl #8
390// CHECK-INST: mov     z0.h, #32512
391// CHECK-ENCODING: [0xe0,0xef,0x78,0x25]
392// CHECK-ERROR: instruction requires: sve or sme
393// CHECK-UNKNOWN: 2578efe0 <unknown>
394
395mov     z5.h, #0xfffa
396// CHECK-INST: mov     z5.h, #-6
397// CHECK-ENCODING: [0x45,0xdf,0x78,0x25]
398// CHECK-ERROR: instruction requires: sve or sme
399// CHECK-UNKNOWN: 2578df45 <unknown>
400
401mov     z5.s, #0xfffffffa
402// CHECK-INST: mov     z5.s, #-6
403// CHECK-ENCODING: [0x45,0xdf,0xb8,0x25]
404// CHECK-ERROR: instruction requires: sve or sme
405// CHECK-UNKNOWN: 25b8df45 <unknown>
406
407mov     z5.d, #0xfffffffffffffffa
408// CHECK-INST: mov     z5.d, #-6
409// CHECK-ENCODING: [0x45,0xdf,0xf8,0x25]
410// CHECK-ERROR: instruction requires: sve or sme
411// CHECK-UNKNOWN: 25f8df45 <unknown>
412
413mov     z0.b, p0/z, #-129
414// CHECK-INST: mov     z0.b, p0/z, #127
415// CHECK-ENCODING: [0xe0,0x0f,0x10,0x05]
416// CHECK-ERROR: instruction requires: sve or sme
417// CHECK-UNKNOWN: 05100fe0 <unknown>
418
419mov     z0.h, p0/z, #-33024
420// CHECK-INST: mov     z0.h, p0/z, #32512
421// CHECK-ENCODING: [0xe0,0x2f,0x50,0x05]
422// CHECK-ERROR: instruction requires: sve or sme
423// CHECK-UNKNOWN: 05502fe0 <unknown>
424
425mov     z0.h, p0/z, #-129, lsl #8
426// CHECK-INST: mov     z0.h, p0/z, #32512
427// CHECK-ENCODING: [0xe0,0x2f,0x50,0x05]
428// CHECK-ERROR: instruction requires: sve or sme
429// CHECK-UNKNOWN: 05502fe0 <unknown>
430
431// --------------------------------------------------------------------------//
432// Tests for merging variant (/m) and testing the range of predicate (> 7)
433// is allowed.
434
435mov     z5.b, p15/m, #-128
436// CHECK-INST: mov     z5.b, p15/m, #-128
437// CHECK-ENCODING: [0x05,0x50,0x1f,0x05]
438// CHECK-ERROR: instruction requires: sve or sme
439// CHECK-UNKNOWN: 051f5005  <unknown>
440
441mov     z21.h, p15/m, #-128
442// CHECK-INST: mov     z21.h, p15/m, #-128
443// CHECK-ENCODING: [0x15,0x50,0x5f,0x05]
444// CHECK-ERROR: instruction requires: sve or sme
445// CHECK-UNKNOWN: 055f5015  <unknown>
446
447mov     z21.h, p15/m, #-128, lsl #8
448// CHECK-INST: mov     z21.h, p15/m, #-32768
449// CHECK-ENCODING: [0x15,0x70,0x5f,0x05]
450// CHECK-ERROR: instruction requires: sve or sme
451// CHECK-UNKNOWN: 055f7015  <unknown>
452
453mov     z21.s, p15/m, #-128
454// CHECK-INST: mov     z21.s, p15/m, #-128
455// CHECK-ENCODING: [0x15,0x50,0x9f,0x05]
456// CHECK-ERROR: instruction requires: sve or sme
457// CHECK-UNKNOWN: 059f5015  <unknown>
458
459mov     z21.s, p15/m, #-128, lsl #8
460// CHECK-INST: mov     z21.s, p15/m, #-32768
461// CHECK-ENCODING: [0x15,0x70,0x9f,0x05]
462// CHECK-ERROR: instruction requires: sve or sme
463// CHECK-UNKNOWN: 059f7015  <unknown>
464
465mov     z21.d, p15/m, #-128
466// CHECK-INST: mov     z21.d, p15/m, #-128
467// CHECK-ENCODING: [0x15,0x50,0xdf,0x05]
468// CHECK-ERROR: instruction requires: sve or sme
469// CHECK-UNKNOWN: 05df5015  <unknown>
470
471mov     z21.d, p15/m, #-128, lsl #8
472// CHECK-INST: mov     z21.d, p15/m, #-32768
473// CHECK-ENCODING: [0x15,0x70,0xdf,0x05]
474// CHECK-ERROR: instruction requires: sve or sme
475// CHECK-UNKNOWN: 05df7015  <unknown>
476
477// --------------------------------------------------------------------------//
478// Tests for indexed variant
479
480mov     z0.b, z0.b[0]
481// CHECK-INST: mov     z0.b, b0
482// CHECK-ENCODING: [0x00,0x20,0x21,0x05]
483// CHECK-ERROR: instruction requires: sve or sme
484// CHECK-UNKNOWN: 05212000 <unknown>
485
486mov     z0.h, z0.h[0]
487// CHECK-INST: mov     z0.h, h0
488// CHECK-ENCODING: [0x00,0x20,0x22,0x05]
489// CHECK-ERROR: instruction requires: sve or sme
490// CHECK-UNKNOWN: 05222000 <unknown>
491
492mov     z0.s, z0.s[0]
493// CHECK-INST: mov     z0.s, s0
494// CHECK-ENCODING: [0x00,0x20,0x24,0x05]
495// CHECK-ERROR: instruction requires: sve or sme
496// CHECK-UNKNOWN: 05242000 <unknown>
497
498mov     z0.d, z0.d[0]
499// CHECK-INST: mov     z0.d, d0
500// CHECK-ENCODING: [0x00,0x20,0x28,0x05]
501// CHECK-ERROR: instruction requires: sve or sme
502// CHECK-UNKNOWN: 05282000 <unknown>
503
504mov     z0.q, z0.q[0]
505// CHECK-INST: mov     z0.q, q0
506// CHECK-ENCODING: [0x00,0x20,0x30,0x05]
507// CHECK-ERROR: instruction requires: sve or sme
508// CHECK-UNKNOWN: 05302000 <unknown>
509
510mov     z0.b, b0
511// CHECK-INST: mov     z0.b, b0
512// CHECK-ENCODING: [0x00,0x20,0x21,0x05]
513// CHECK-ERROR: instruction requires: sve or sme
514// CHECK-UNKNOWN: 05212000 <unknown>
515
516mov     z0.h, h0
517// CHECK-INST: mov     z0.h, h0
518// CHECK-ENCODING: [0x00,0x20,0x22,0x05]
519// CHECK-ERROR: instruction requires: sve or sme
520// CHECK-UNKNOWN: 05222000 <unknown>
521
522mov     z0.s, s0
523// CHECK-INST: mov     z0.s, s0
524// CHECK-ENCODING: [0x00,0x20,0x24,0x05]
525// CHECK-ERROR: instruction requires: sve or sme
526// CHECK-UNKNOWN: 05242000 <unknown>
527
528mov     z0.d, d0
529// CHECK-INST: mov     z0.d, d0
530// CHECK-ENCODING: [0x00,0x20,0x28,0x05]
531// CHECK-ERROR: instruction requires: sve or sme
532// CHECK-UNKNOWN: 05282000 <unknown>
533
534mov     z0.q, q0
535// CHECK-INST: mov     z0.q, q0
536// CHECK-ENCODING: [0x00,0x20,0x30,0x05]
537// CHECK-ERROR: instruction requires: sve or sme
538// CHECK-UNKNOWN: 05302000 <unknown>
539
540mov     z31.b, z31.b[63]
541// CHECK-INST: mov     z31.b, z31.b[63]
542// CHECK-ENCODING: [0xff,0x23,0xff,0x05]
543// CHECK-ERROR: instruction requires: sve or sme
544// CHECK-UNKNOWN: 05ff23ff <unknown>
545
546mov     z31.h, z31.h[31]
547// CHECK-INST: mov     z31.h, z31.h[31]
548// CHECK-ENCODING: [0xff,0x23,0xfe,0x05]
549// CHECK-ERROR: instruction requires: sve or sme
550// CHECK-UNKNOWN: 05fe23ff <unknown>
551
552mov     z31.s, z31.s[15]
553// CHECK-INST: mov     z31.s, z31.s[15]
554// CHECK-ENCODING: [0xff,0x23,0xfc,0x05]
555// CHECK-ERROR: instruction requires: sve or sme
556// CHECK-UNKNOWN: 05fc23ff <unknown>
557
558mov     z31.d, z31.d[7]
559// CHECK-INST: mov     z31.d, z31.d[7]
560// CHECK-ENCODING: [0xff,0x23,0xf8,0x05]
561// CHECK-ERROR: instruction requires: sve or sme
562// CHECK-UNKNOWN: 05f823ff <unknown>
563
564mov     z5.q, z17.q[3]
565// CHECK-INST: mov     z5.q, z17.q[3]
566// CHECK-ENCODING: [0x25,0x22,0xf0,0x05]
567// CHECK-ERROR: instruction requires: sve or sme
568// CHECK-UNKNOWN: 05f02225 <unknown>
569
570
571// --------------------------------------------------------------------------//
572// Tests for predicated copy of SIMD/FP registers.
573
574mov     z0.b, p0/m, w0
575// CHECK-INST: mov     z0.b, p0/m, w0
576// CHECK-ENCODING: [0x00,0xa0,0x28,0x05]
577// CHECK-ERROR: instruction requires: sve or sme
578// CHECK-UNKNOWN: 0528a000 <unknown>
579
580mov     z0.h, p0/m, w0
581// CHECK-INST: mov     z0.h, p0/m, w0
582// CHECK-ENCODING: [0x00,0xa0,0x68,0x05]
583// CHECK-ERROR: instruction requires: sve or sme
584// CHECK-UNKNOWN: 0568a000 <unknown>
585
586mov     z0.s, p0/m, w0
587// CHECK-INST: mov     z0.s, p0/m, w0
588// CHECK-ENCODING: [0x00,0xa0,0xa8,0x05]
589// CHECK-ERROR: instruction requires: sve or sme
590// CHECK-UNKNOWN: 05a8a000 <unknown>
591
592mov     z0.d, p0/m, x0
593// CHECK-INST: mov     z0.d, p0/m, x0
594// CHECK-ENCODING: [0x00,0xa0,0xe8,0x05]
595// CHECK-ERROR: instruction requires: sve or sme
596// CHECK-UNKNOWN: 05e8a000 <unknown>
597
598mov     z31.b, p7/m, wsp
599// CHECK-INST: mov     z31.b, p7/m, wsp
600// CHECK-ENCODING: [0xff,0xbf,0x28,0x05]
601// CHECK-ERROR: instruction requires: sve or sme
602// CHECK-UNKNOWN: 0528bfff <unknown>
603
604mov     z31.h, p7/m, wsp
605// CHECK-INST: mov     z31.h, p7/m, wsp
606// CHECK-ENCODING: [0xff,0xbf,0x68,0x05]
607// CHECK-ERROR: instruction requires: sve or sme
608// CHECK-UNKNOWN: 0568bfff <unknown>
609
610mov     z31.s, p7/m, wsp
611// CHECK-INST: mov     z31.s, p7/m, wsp
612// CHECK-ENCODING: [0xff,0xbf,0xa8,0x05]
613// CHECK-ERROR: instruction requires: sve or sme
614// CHECK-UNKNOWN: 05a8bfff <unknown>
615
616mov     z31.d, p7/m, sp
617// CHECK-INST: mov     z31.d, p7/m, sp
618// CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]
619// CHECK-ERROR: instruction requires: sve or sme
620// CHECK-UNKNOWN: 05e8bfff <unknown>
621
622mov     z0.b, p0/m, b0
623// CHECK-INST: mov     z0.b, p0/m, b0
624// CHECK-ENCODING: [0x00,0x80,0x20,0x05]
625// CHECK-ERROR: instruction requires: sve or sme
626// CHECK-UNKNOWN: 05208000 <unknown>
627
628mov     z31.b, p7/m, b31
629// CHECK-INST: mov     z31.b, p7/m, b31
630// CHECK-ENCODING: [0xff,0x9f,0x20,0x05]
631// CHECK-ERROR: instruction requires: sve or sme
632// CHECK-UNKNOWN: 05209fff <unknown>
633
634mov     z0.h, p0/m, h0
635// CHECK-INST: mov     z0.h, p0/m, h0
636// CHECK-ENCODING: [0x00,0x80,0x60,0x05]
637// CHECK-ERROR: instruction requires: sve or sme
638// CHECK-UNKNOWN: 05608000 <unknown>
639
640mov     z31.h, p7/m, h31
641// CHECK-INST: mov     z31.h, p7/m, h31
642// CHECK-ENCODING: [0xff,0x9f,0x60,0x05]
643// CHECK-ERROR: instruction requires: sve or sme
644// CHECK-UNKNOWN: 05609fff <unknown>
645
646mov     z0.s, p0/m, s0
647// CHECK-INST: mov     z0.s, p0/m, s0
648// CHECK-ENCODING: [0x00,0x80,0xa0,0x05]
649// CHECK-ERROR: instruction requires: sve or sme
650// CHECK-UNKNOWN: 05a08000 <unknown>
651
652mov     z31.s, p7/m, s31
653// CHECK-INST: mov     z31.s, p7/m, s31
654// CHECK-ENCODING: [0xff,0x9f,0xa0,0x05]
655// CHECK-ERROR: instruction requires: sve or sme
656// CHECK-UNKNOWN: 05a09fff <unknown>
657
658mov     z0.d, p0/m, d0
659// CHECK-INST: mov     z0.d, p0/m, d0
660// CHECK-ENCODING: [0x00,0x80,0xe0,0x05]
661// CHECK-ERROR: instruction requires: sve or sme
662// CHECK-UNKNOWN: 05e08000 <unknown>
663
664mov     z31.d, p7/m, d31
665// CHECK-INST: mov     z31.d, p7/m, d31
666// CHECK-ENCODING: [0xff,0x9f,0xe0,0x05]
667// CHECK-ERROR: instruction requires: sve or sme
668// CHECK-UNKNOWN: 05e09fff <unknown>
669
670mov     p0.b, p0/m, p0.b
671// CHECK-INST: mov     p0.b, p0/m, p0.b
672// CHECK-ENCODING: [0x10,0x42,0x00,0x25]
673// CHECK-ERROR: instruction requires: sve or sme
674// CHECK-UNKNOWN: 25004210 <unknown>
675
676mov     p15.b, p15/m, p15.b
677// CHECK-INST: mov     p15.b, p15/m, p15.b
678// CHECK-ENCODING: [0xff,0x7f,0x0f,0x25]
679// CHECK-ERROR: instruction requires: sve or sme
680// CHECK-UNKNOWN: 250f7fff <unknown>
681
682mov     z31.b, p15/m, z31.b
683// CHECK-INST: mov     z31.b, p15/m, z31.b
684// CHECK-ENCODING: [0xff,0xff,0x3f,0x05]
685// CHECK-ERROR: instruction requires: sve or sme
686// CHECK-UNKNOWN: 053fffff <unknown>
687
688mov     z31.h, p15/m, z31.h
689// CHECK-INST: mov     z31.h, p15/m, z31.h
690// CHECK-ENCODING: [0xff,0xff,0x7f,0x05]
691// CHECK-ERROR: instruction requires: sve or sme
692// CHECK-UNKNOWN: 057fffff <unknown>
693
694mov     z31.s, p15/m, z31.s
695// CHECK-INST: mov     z31.s, p15/m, z31.s
696// CHECK-ENCODING: [0xff,0xff,0xbf,0x05]
697// CHECK-ERROR: instruction requires: sve or sme
698// CHECK-UNKNOWN: 05bfffff <unknown>
699
700mov     z31.d, p15/m, z31.d
701// CHECK-INST: mov     z31.d, p15/m, z31.d
702// CHECK-ENCODING: [0xff,0xff,0xff,0x05]
703// CHECK-ERROR: instruction requires: sve or sme
704// CHECK-UNKNOWN: 05ffffff <unknown>
705
706mov     p0.b, p0.b
707// CHECK-INST: mov     p0.b, p0.b
708// CHECK-ENCODING: [0x00,0x40,0x80,0x25]
709// CHECK-ERROR: instruction requires: sve or sme
710// CHECK-UNKNOWN: 25804000 <unknown>
711
712mov     p15.b, p15.b
713// CHECK-INST: mov     p15.b, p15.b
714// CHECK-ENCODING: [0xef,0x7d,0x8f,0x25]
715// CHECK-ERROR: instruction requires: sve or sme
716// CHECK-UNKNOWN: 258f7def <unknown>
717
718mov     p0.b, p0/z, p0.b
719// CHECK-INST: mov     p0.b, p0/z, p0.b
720// CHECK-ENCODING: [0x00,0x40,0x00,0x25]
721// CHECK-ERROR: instruction requires: sve or sme
722// CHECK-UNKNOWN: 25004000 <unknown>
723
724mov     p15.b, p15/z, p15.b
725// CHECK-INST: mov     p15.b, p15/z, p15.b
726// CHECK-ENCODING: [0xef,0x7d,0x0f,0x25]
727// CHECK-ERROR: instruction requires: sve or sme
728// CHECK-UNKNOWN: 250f7def <unknown>
729
730
731// --------------------------------------------------------------------------//
732// Test compatibility with MOVPRFX instruction.
733
734movprfx z31.d, p7/z, z6.d
735// CHECK-INST: movprfx	z31.d, p7/z, z6.d
736// CHECK-ENCODING: [0xdf,0x3c,0xd0,0x04]
737// CHECK-ERROR: instruction requires: sve or sme
738// CHECK-UNKNOWN: 04d03cdf <unknown>
739
740mov     z31.d, p7/m, sp
741// CHECK-INST: mov	z31.d, p7/m, sp
742// CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]
743// CHECK-ERROR: instruction requires: sve or sme
744// CHECK-UNKNOWN: 05e8bfff <unknown>
745
746movprfx z31, z6
747// CHECK-INST: movprfx	z31, z6
748// CHECK-ENCODING: [0xdf,0xbc,0x20,0x04]
749// CHECK-ERROR: instruction requires: sve or sme
750// CHECK-UNKNOWN: 0420bcdf <unknown>
751
752mov     z31.d, p7/m, sp
753// CHECK-INST: mov	z31.d, p7/m, sp
754// CHECK-ENCODING: [0xff,0xbf,0xe8,0x05]
755// CHECK-ERROR: instruction requires: sve or sme
756// CHECK-UNKNOWN: 05e8bfff <unknown>
757
758movprfx z21.d, p7/z, z28.d
759// CHECK-INST: movprfx	z21.d, p7/z, z28.d
760// CHECK-ENCODING: [0x95,0x3f,0xd0,0x04]
761// CHECK-ERROR: instruction requires: sve or sme
762// CHECK-UNKNOWN: 04d03f95 <unknown>
763
764mov     z21.d, p7/m, #-128, lsl #8
765// CHECK-INST: mov	z21.d, p7/m, #-32768
766// CHECK-ENCODING: [0x15,0x70,0xd7,0x05]
767// CHECK-ERROR: instruction requires: sve or sme
768// CHECK-UNKNOWN: 05d77015 <unknown>
769
770movprfx z21, z28
771// CHECK-INST: movprfx	z21, z28
772// CHECK-ENCODING: [0x95,0xbf,0x20,0x04]
773// CHECK-ERROR: instruction requires: sve or sme
774// CHECK-UNKNOWN: 0420bf95 <unknown>
775
776mov     z21.d, p15/m, #-128, lsl #8
777// CHECK-INST: mov	z21.d, p15/m, #-32768
778// CHECK-ENCODING: [0x15,0x70,0xdf,0x05]
779// CHECK-ERROR: instruction requires: sve or sme
780// CHECK-UNKNOWN: 05df7015 <unknown>
781
782movprfx z4.d, p7/z, z6.d
783// CHECK-INST: movprfx	z4.d, p7/z, z6.d
784// CHECK-ENCODING: [0xc4,0x3c,0xd0,0x04]
785// CHECK-ERROR: instruction requires: sve or sme
786// CHECK-UNKNOWN: 04d03cc4 <unknown>
787
788mov     z4.d, p7/m, d31
789// CHECK-INST: mov	z4.d, p7/m, d31
790// CHECK-ENCODING: [0xe4,0x9f,0xe0,0x05]
791// CHECK-ERROR: instruction requires: sve or sme
792// CHECK-UNKNOWN: 05e09fe4 <unknown>
793
794movprfx z4, z6
795// CHECK-INST: movprfx	z4, z6
796// CHECK-ENCODING: [0xc4,0xbc,0x20,0x04]
797// CHECK-ERROR: instruction requires: sve or sme
798// CHECK-UNKNOWN: 0420bcc4 <unknown>
799
800mov     z4.d, p7/m, d31
801// CHECK-INST: mov	z4.d, p7/m, d31
802// CHECK-ENCODING: [0xe4,0x9f,0xe0,0x05]
803// CHECK-ERROR: instruction requires: sve or sme
804// CHECK-UNKNOWN: 05e09fe4 <unknown>
805