xref: /llvm-project/llvm/test/MC/AArch64/armv8.8a-mops.s (revision e35a3f188f6a33ba63000d4d2b999f341cd57a9f)
1// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+mops,+mte < %s 2> %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MTE
2// RUN: FileCheck --check-prefix=CHECK-ERROR %s < %t
3// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.8a,+mte < %s 2> %t | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MTE
4// RUN: FileCheck --check-prefix=CHECK-ERROR %s < %t
5// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+mops < %s 2> %t | FileCheck %s --check-prefix=CHECK
6// RUN: FileCheck --check-prefix=CHECK-NO-MTE-ERR %s < %t
7// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.8a < %s 2> %t | FileCheck %s --check-prefix=CHECK
8// RUN: FileCheck --check-prefix=CHECK-NO-MTE-ERR %s < %t
9// RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2> %t
10// RUN: FileCheck --check-prefix=CHECK-NO-MOPS-ERR --check-prefix=CHECK-NO-MOPSMTE-ERR %s < %t
11
12// CHECK:      [0x40,0x04,0x01,0x19]
13// CHECK-NEXT: [0x40,0x44,0x01,0x19]
14// CHECK-NEXT: [0x40,0x84,0x01,0x19]
15// CHECK-NEXT: [0x40,0xc4,0x01,0x19]
16// CHECK-NEXT: [0x40,0x14,0x01,0x19]
17// CHECK-NEXT: [0x40,0x54,0x01,0x19]
18// CHECK-NEXT: [0x40,0x94,0x01,0x19]
19// CHECK-NEXT: [0x40,0xd4,0x01,0x19]
20// CHECK-NEXT: [0x40,0x24,0x01,0x19]
21// CHECK-NEXT: [0x40,0x64,0x01,0x19]
22// CHECK-NEXT: [0x40,0xa4,0x01,0x19]
23// CHECK-NEXT: [0x40,0xe4,0x01,0x19]
24// CHECK-NEXT: [0x40,0x34,0x01,0x19]
25// CHECK-NEXT: [0x40,0x74,0x01,0x19]
26// CHECK-NEXT: [0x40,0xb4,0x01,0x19]
27// CHECK-NEXT: [0x40,0xf4,0x01,0x19]
28// CHECK-NO-MOPS-ERR: error: instruction requires: mops
29// CHECK-NO-MOPS-ERR: error: instruction requires: mops
30// CHECK-NO-MOPS-ERR: error: instruction requires: mops
31// CHECK-NO-MOPS-ERR: error: instruction requires: mops
32// CHECK-NO-MOPS-ERR: error: instruction requires: mops
33// CHECK-NO-MOPS-ERR: error: instruction requires: mops
34// CHECK-NO-MOPS-ERR: error: instruction requires: mops
35// CHECK-NO-MOPS-ERR: error: instruction requires: mops
36// CHECK-NO-MOPS-ERR: error: instruction requires: mops
37// CHECK-NO-MOPS-ERR: error: instruction requires: mops
38// CHECK-NO-MOPS-ERR: error: instruction requires: mops
39// CHECK-NO-MOPS-ERR: error: instruction requires: mops
40// CHECK-NO-MOPS-ERR: error: instruction requires: mops
41// CHECK-NO-MOPS-ERR: error: instruction requires: mops
42// CHECK-NO-MOPS-ERR: error: instruction requires: mops
43// CHECK-NO-MOPS-ERR: error: instruction requires: mops
44cpyfp [x0]!, [x1]!, x2!
45cpyfpwn [x0]!, [x1]!, x2!
46cpyfprn [x0]!, [x1]!, x2!
47cpyfpn [x0]!, [x1]!, x2!
48cpyfpwt [x0]!, [x1]!, x2!
49cpyfpwtwn [x0]!, [x1]!, x2!
50cpyfpwtrn [x0]!, [x1]!, x2!
51cpyfpwtn [x0]!, [x1]!, x2!
52cpyfprt [x0]!, [x1]!, x2!
53cpyfprtwn [x0]!, [x1]!, x2!
54cpyfprtrn [x0]!, [x1]!, x2!
55cpyfprtn [x0]!, [x1]!, x2!
56cpyfpt [x0]!, [x1]!, x2!
57cpyfptwn [x0]!, [x1]!, x2!
58cpyfptrn [x0]!, [x1]!, x2!
59cpyfptn [x0]!, [x1]!, x2!
60
61// CHECK:      [0x40,0x04,0x41,0x19]
62// CHECK-NEXT: [0x40,0x44,0x41,0x19]
63// CHECK-NEXT: [0x40,0x84,0x41,0x19]
64// CHECK-NEXT: [0x40,0xc4,0x41,0x19]
65// CHECK-NEXT: [0x40,0x14,0x41,0x19]
66// CHECK-NEXT: [0x40,0x54,0x41,0x19]
67// CHECK-NEXT: [0x40,0x94,0x41,0x19]
68// CHECK-NEXT: [0x40,0xd4,0x41,0x19]
69// CHECK-NEXT: [0x40,0x24,0x41,0x19]
70// CHECK-NEXT: [0x40,0x64,0x41,0x19]
71// CHECK-NEXT: [0x40,0xa4,0x41,0x19]
72// CHECK-NEXT: [0x40,0xe4,0x41,0x19]
73// CHECK-NEXT: [0x40,0x34,0x41,0x19]
74// CHECK-NEXT: [0x40,0x74,0x41,0x19]
75// CHECK-NEXT: [0x40,0xb4,0x41,0x19]
76// CHECK-NEXT: [0x40,0xf4,0x41,0x19]
77// CHECK-NO-MOPS-ERR: error: instruction requires: mops
78// CHECK-NO-MOPS-ERR: error: instruction requires: mops
79// CHECK-NO-MOPS-ERR: error: instruction requires: mops
80// CHECK-NO-MOPS-ERR: error: instruction requires: mops
81// CHECK-NO-MOPS-ERR: error: instruction requires: mops
82// CHECK-NO-MOPS-ERR: error: instruction requires: mops
83// CHECK-NO-MOPS-ERR: error: instruction requires: mops
84// CHECK-NO-MOPS-ERR: error: instruction requires: mops
85// CHECK-NO-MOPS-ERR: error: instruction requires: mops
86// CHECK-NO-MOPS-ERR: error: instruction requires: mops
87// CHECK-NO-MOPS-ERR: error: instruction requires: mops
88// CHECK-NO-MOPS-ERR: error: instruction requires: mops
89// CHECK-NO-MOPS-ERR: error: instruction requires: mops
90// CHECK-NO-MOPS-ERR: error: instruction requires: mops
91// CHECK-NO-MOPS-ERR: error: instruction requires: mops
92// CHECK-NO-MOPS-ERR: error: instruction requires: mops
93cpyfm [x0]!, [x1]!, x2!
94cpyfmwn [x0]!, [x1]!, x2!
95cpyfmrn [x0]!, [x1]!, x2!
96cpyfmn [x0]!, [x1]!, x2!
97cpyfmwt [x0]!, [x1]!, x2!
98cpyfmwtwn [x0]!, [x1]!, x2!
99cpyfmwtrn [x0]!, [x1]!, x2!
100cpyfmwtn [x0]!, [x1]!, x2!
101cpyfmrt [x0]!, [x1]!, x2!
102cpyfmrtwn [x0]!, [x1]!, x2!
103cpyfmrtrn [x0]!, [x1]!, x2!
104cpyfmrtn [x0]!, [x1]!, x2!
105cpyfmt [x0]!, [x1]!, x2!
106cpyfmtwn [x0]!, [x1]!, x2!
107cpyfmtrn [x0]!, [x1]!, x2!
108cpyfmtn [x0]!, [x1]!, x2!
109
110// CHECK:      [0x40,0x04,0x81,0x19]
111// CHECK-NEXT: [0x40,0x44,0x81,0x19]
112// CHECK-NEXT: [0x40,0x84,0x81,0x19]
113// CHECK-NEXT: [0x40,0xc4,0x81,0x19]
114// CHECK-NEXT: [0x40,0x14,0x81,0x19]
115// CHECK-NEXT: [0x40,0x54,0x81,0x19]
116// CHECK-NEXT: [0x40,0x94,0x81,0x19]
117// CHECK-NEXT: [0x40,0xd4,0x81,0x19]
118// CHECK-NEXT: [0x40,0x24,0x81,0x19]
119// CHECK-NEXT: [0x40,0x64,0x81,0x19]
120// CHECK-NEXT: [0x40,0xa4,0x81,0x19]
121// CHECK-NEXT: [0x40,0xe4,0x81,0x19]
122// CHECK-NEXT: [0x40,0x34,0x81,0x19]
123// CHECK-NEXT: [0x40,0x74,0x81,0x19]
124// CHECK-NEXT: [0x40,0xb4,0x81,0x19]
125// CHECK-NEXT: [0x40,0xf4,0x81,0x19]
126// CHECK-NO-MOPS-ERR: error: instruction requires: mops
127// CHECK-NO-MOPS-ERR: error: instruction requires: mops
128// CHECK-NO-MOPS-ERR: error: instruction requires: mops
129// CHECK-NO-MOPS-ERR: error: instruction requires: mops
130// CHECK-NO-MOPS-ERR: error: instruction requires: mops
131// CHECK-NO-MOPS-ERR: error: instruction requires: mops
132// CHECK-NO-MOPS-ERR: error: instruction requires: mops
133// CHECK-NO-MOPS-ERR: error: instruction requires: mops
134// CHECK-NO-MOPS-ERR: error: instruction requires: mops
135// CHECK-NO-MOPS-ERR: error: instruction requires: mops
136// CHECK-NO-MOPS-ERR: error: instruction requires: mops
137// CHECK-NO-MOPS-ERR: error: instruction requires: mops
138// CHECK-NO-MOPS-ERR: error: instruction requires: mops
139// CHECK-NO-MOPS-ERR: error: instruction requires: mops
140// CHECK-NO-MOPS-ERR: error: instruction requires: mops
141// CHECK-NO-MOPS-ERR: error: instruction requires: mops
142cpyfe [x0]!, [x1]!, x2!
143cpyfewn [x0]!, [x1]!, x2!
144cpyfern [x0]!, [x1]!, x2!
145cpyfen [x0]!, [x1]!, x2!
146cpyfewt [x0]!, [x1]!, x2!
147cpyfewtwn [x0]!, [x1]!, x2!
148cpyfewtrn [x0]!, [x1]!, x2!
149cpyfewtn [x0]!, [x1]!, x2!
150cpyfert [x0]!, [x1]!, x2!
151cpyfertwn [x0]!, [x1]!, x2!
152cpyfertrn [x0]!, [x1]!, x2!
153cpyfertn [x0]!, [x1]!, x2!
154cpyfet [x0]!, [x1]!, x2!
155cpyfetwn [x0]!, [x1]!, x2!
156cpyfetrn [x0]!, [x1]!, x2!
157cpyfetn [x0]!, [x1]!, x2!
158
159// CHECK:      [0x40,0x04,0x01,0x1d]
160// CHECK-NEXT: [0x40,0x44,0x01,0x1d]
161// CHECK-NEXT: [0x40,0x84,0x01,0x1d]
162// CHECK-NEXT: [0x40,0xc4,0x01,0x1d]
163// CHECK-NEXT: [0x40,0x14,0x01,0x1d]
164// CHECK-NEXT: [0x40,0x54,0x01,0x1d]
165// CHECK-NEXT: [0x40,0x94,0x01,0x1d]
166// CHECK-NEXT: [0x40,0xd4,0x01,0x1d]
167// CHECK-NEXT: [0x40,0x24,0x01,0x1d]
168// CHECK-NEXT: [0x40,0x64,0x01,0x1d]
169// CHECK-NEXT: [0x40,0xa4,0x01,0x1d]
170// CHECK-NEXT: [0x40,0xe4,0x01,0x1d]
171// CHECK-NEXT: [0x40,0x34,0x01,0x1d]
172// CHECK-NEXT: [0x40,0x74,0x01,0x1d]
173// CHECK-NEXT: [0x40,0xb4,0x01,0x1d]
174// CHECK-NEXT: [0x40,0xf4,0x01,0x1d]
175// CHECK-NO-MOPS-ERR: error: instruction requires: mops
176// CHECK-NO-MOPS-ERR: error: instruction requires: mops
177// CHECK-NO-MOPS-ERR: error: instruction requires: mops
178// CHECK-NO-MOPS-ERR: error: instruction requires: mops
179// CHECK-NO-MOPS-ERR: error: instruction requires: mops
180// CHECK-NO-MOPS-ERR: error: instruction requires: mops
181// CHECK-NO-MOPS-ERR: error: instruction requires: mops
182// CHECK-NO-MOPS-ERR: error: instruction requires: mops
183// CHECK-NO-MOPS-ERR: error: instruction requires: mops
184// CHECK-NO-MOPS-ERR: error: instruction requires: mops
185// CHECK-NO-MOPS-ERR: error: instruction requires: mops
186// CHECK-NO-MOPS-ERR: error: instruction requires: mops
187// CHECK-NO-MOPS-ERR: error: instruction requires: mops
188// CHECK-NO-MOPS-ERR: error: instruction requires: mops
189// CHECK-NO-MOPS-ERR: error: instruction requires: mops
190// CHECK-NO-MOPS-ERR: error: instruction requires: mops
191cpyp [x0]!, [x1]!, x2!
192cpypwn [x0]!, [x1]!, x2!
193cpyprn [x0]!, [x1]!, x2!
194cpypn [x0]!, [x1]!, x2!
195cpypwt [x0]!, [x1]!, x2!
196cpypwtwn [x0]!, [x1]!, x2!
197cpypwtrn [x0]!, [x1]!, x2!
198cpypwtn [x0]!, [x1]!, x2!
199cpyprt [x0]!, [x1]!, x2!
200cpyprtwn [x0]!, [x1]!, x2!
201cpyprtrn [x0]!, [x1]!, x2!
202cpyprtn [x0]!, [x1]!, x2!
203cpypt [x0]!, [x1]!, x2!
204cpyptwn [x0]!, [x1]!, x2!
205cpyptrn [x0]!, [x1]!, x2!
206cpyptn [x0]!, [x1]!, x2!
207
208// CHECK:      [0x40,0x04,0x41,0x1d]
209// CHECK-NEXT: [0x40,0x44,0x41,0x1d]
210// CHECK-NEXT: [0x40,0x84,0x41,0x1d]
211// CHECK-NEXT: [0x40,0xc4,0x41,0x1d]
212// CHECK-NEXT: [0x40,0x14,0x41,0x1d]
213// CHECK-NEXT: [0x40,0x54,0x41,0x1d]
214// CHECK-NEXT: [0x40,0x94,0x41,0x1d]
215// CHECK-NEXT: [0x40,0xd4,0x41,0x1d]
216// CHECK-NEXT: [0x40,0x24,0x41,0x1d]
217// CHECK-NEXT: [0x40,0x64,0x41,0x1d]
218// CHECK-NEXT: [0x40,0xa4,0x41,0x1d]
219// CHECK-NEXT: [0x40,0xe4,0x41,0x1d]
220// CHECK-NEXT: [0x40,0x34,0x41,0x1d]
221// CHECK-NEXT: [0x40,0x74,0x41,0x1d]
222// CHECK-NEXT: [0x40,0xb4,0x41,0x1d]
223// CHECK-NEXT: [0x40,0xf4,0x41,0x1d]
224// CHECK-NO-MOPS-ERR: error: instruction requires: mops
225// CHECK-NO-MOPS-ERR: error: instruction requires: mops
226// CHECK-NO-MOPS-ERR: error: instruction requires: mops
227// CHECK-NO-MOPS-ERR: error: instruction requires: mops
228// CHECK-NO-MOPS-ERR: error: instruction requires: mops
229// CHECK-NO-MOPS-ERR: error: instruction requires: mops
230// CHECK-NO-MOPS-ERR: error: instruction requires: mops
231// CHECK-NO-MOPS-ERR: error: instruction requires: mops
232// CHECK-NO-MOPS-ERR: error: instruction requires: mops
233// CHECK-NO-MOPS-ERR: error: instruction requires: mops
234// CHECK-NO-MOPS-ERR: error: instruction requires: mops
235// CHECK-NO-MOPS-ERR: error: instruction requires: mops
236// CHECK-NO-MOPS-ERR: error: instruction requires: mops
237// CHECK-NO-MOPS-ERR: error: instruction requires: mops
238// CHECK-NO-MOPS-ERR: error: instruction requires: mops
239// CHECK-NO-MOPS-ERR: error: instruction requires: mops
240cpym [x0]!, [x1]!, x2!
241cpymwn [x0]!, [x1]!, x2!
242cpymrn [x0]!, [x1]!, x2!
243cpymn [x0]!, [x1]!, x2!
244cpymwt [x0]!, [x1]!, x2!
245cpymwtwn [x0]!, [x1]!, x2!
246cpymwtrn [x0]!, [x1]!, x2!
247cpymwtn [x0]!, [x1]!, x2!
248cpymrt [x0]!, [x1]!, x2!
249cpymrtwn [x0]!, [x1]!, x2!
250cpymrtrn [x0]!, [x1]!, x2!
251cpymrtn [x0]!, [x1]!, x2!
252cpymt [x0]!, [x1]!, x2!
253cpymtwn [x0]!, [x1]!, x2!
254cpymtrn [x0]!, [x1]!, x2!
255cpymtn [x0]!, [x1]!, x2!
256
257// CHECK:      [0x40,0x04,0x81,0x1d]
258// CHECK-NEXT: [0x40,0x44,0x81,0x1d]
259// CHECK-NEXT: [0x40,0x84,0x81,0x1d]
260// CHECK-NEXT: [0x40,0xc4,0x81,0x1d]
261// CHECK-NEXT: [0x40,0x14,0x81,0x1d]
262// CHECK-NEXT: [0x40,0x54,0x81,0x1d]
263// CHECK-NEXT: [0x40,0x94,0x81,0x1d]
264// CHECK-NEXT: [0x40,0xd4,0x81,0x1d]
265// CHECK-NEXT: [0x40,0x24,0x81,0x1d]
266// CHECK-NEXT: [0x40,0x64,0x81,0x1d]
267// CHECK-NEXT: [0x40,0xa4,0x81,0x1d]
268// CHECK-NEXT: [0x40,0xe4,0x81,0x1d]
269// CHECK-NEXT: [0x40,0x34,0x81,0x1d]
270// CHECK-NEXT: [0x40,0x74,0x81,0x1d]
271// CHECK-NEXT: [0x40,0xb4,0x81,0x1d]
272// CHECK-NEXT: [0x40,0xf4,0x81,0x1d]
273// CHECK-NO-MOPS-ERR: error: instruction requires: mops
274// CHECK-NO-MOPS-ERR: error: instruction requires: mops
275// CHECK-NO-MOPS-ERR: error: instruction requires: mops
276// CHECK-NO-MOPS-ERR: error: instruction requires: mops
277// CHECK-NO-MOPS-ERR: error: instruction requires: mops
278// CHECK-NO-MOPS-ERR: error: instruction requires: mops
279// CHECK-NO-MOPS-ERR: error: instruction requires: mops
280// CHECK-NO-MOPS-ERR: error: instruction requires: mops
281// CHECK-NO-MOPS-ERR: error: instruction requires: mops
282// CHECK-NO-MOPS-ERR: error: instruction requires: mops
283// CHECK-NO-MOPS-ERR: error: instruction requires: mops
284// CHECK-NO-MOPS-ERR: error: instruction requires: mops
285// CHECK-NO-MOPS-ERR: error: instruction requires: mops
286// CHECK-NO-MOPS-ERR: error: instruction requires: mops
287// CHECK-NO-MOPS-ERR: error: instruction requires: mops
288// CHECK-NO-MOPS-ERR: error: instruction requires: mops
289cpye [x0]!, [x1]!, x2!
290cpyewn [x0]!, [x1]!, x2!
291cpyern [x0]!, [x1]!, x2!
292cpyen [x0]!, [x1]!, x2!
293cpyewt [x0]!, [x1]!, x2!
294cpyewtwn [x0]!, [x1]!, x2!
295cpyewtrn [x0]!, [x1]!, x2!
296cpyewtn [x0]!, [x1]!, x2!
297cpyert [x0]!, [x1]!, x2!
298cpyertwn [x0]!, [x1]!, x2!
299cpyertrn [x0]!, [x1]!, x2!
300cpyertn [x0]!, [x1]!, x2!
301cpyet [x0]!, [x1]!, x2!
302cpyetwn [x0]!, [x1]!, x2!
303cpyetrn [x0]!, [x1]!, x2!
304cpyetn [x0]!, [x1]!, x2!
305
306// CHECK:      [0x20,0x04,0xc2,0x19]
307// CHECK-NEXT: [0x20,0x14,0xc2,0x19]
308// CHECK-NEXT: [0x20,0x24,0xc2,0x19]
309// CHECK-NEXT: [0x20,0x34,0xc2,0x19]
310// CHECK-NO-MOPS-ERR: error: instruction requires: mops
311// CHECK-NO-MOPS-ERR: error: instruction requires: mops
312// CHECK-NO-MOPS-ERR: error: instruction requires: mops
313// CHECK-NO-MOPS-ERR: error: instruction requires: mops
314setp [x0]!, x1!, x2
315setpt [x0]!, x1!, x2
316setpn [x0]!, x1!, x2
317setptn [x0]!, x1!, x2
318
319// CHECK: [0x20,0x44,0xc2,0x19]
320// CHECK: [0x20,0x54,0xc2,0x19]
321// CHECK: [0x20,0x64,0xc2,0x19]
322// CHECK: [0x20,0x74,0xc2,0x19]
323// CHECK-NO-MOPS-ERR: error: instruction requires: mops
324// CHECK-NO-MOPS-ERR: error: instruction requires: mops
325// CHECK-NO-MOPS-ERR: error: instruction requires: mops
326// CHECK-NO-MOPS-ERR: error: instruction requires: mops
327setm [x0]!, x1!, x2
328setmt [x0]!, x1!, x2
329setmn [x0]!, x1!, x2
330setmtn [x0]!, x1!, x2
331
332// CHECK: [0x20,0x84,0xc2,0x19]
333// CHECK: [0x20,0x94,0xc2,0x19]
334// CHECK: [0x20,0xa4,0xc2,0x19]
335// CHECK: [0x20,0xb4,0xc2,0x19]
336// CHECK-NO-MOPS-ERR: error: instruction requires: mops
337// CHECK-NO-MOPS-ERR: error: instruction requires: mops
338// CHECK-NO-MOPS-ERR: error: instruction requires: mops
339// CHECK-NO-MOPS-ERR: error: instruction requires: mops
340sete [x0]!, x1!, x2
341setet [x0]!, x1!, x2
342seten [x0]!, x1!, x2
343setetn [x0]!, x1!, x2
344
345// CHECK-MTE: [0x20,0x04,0xc2,0x1d]
346// CHECK-MTE: [0x20,0x14,0xc2,0x1d]
347// CHECK-MTE: [0x20,0x24,0xc2,0x1d]
348// CHECK-MTE: [0x20,0x34,0xc2,0x1d]
349// CHECK-NO-MTE-ERR: error: instruction requires: mte
350// CHECK-NO-MTE-ERR: error: instruction requires: mte
351// CHECK-NO-MTE-ERR: error: instruction requires: mte
352// CHECK-NO-MTE-ERR: error: instruction requires: mte
353// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
354// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
355// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
356// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
357setgp [x0]!, x1!, x2
358setgpt [x0]!, x1!, x2
359setgpn [x0]!, x1!, x2
360setgptn [x0]!, x1!, x2
361
362// CHECK-MTE: [0x20,0x44,0xc2,0x1d]
363// CHECK-MTE: [0x20,0x54,0xc2,0x1d]
364// CHECK-MTE: [0x20,0x64,0xc2,0x1d]
365// CHECK-MTE: [0x20,0x74,0xc2,0x1d]
366// CHECK-NO-MTE-ERR: error: instruction requires: mte
367// CHECK-NO-MTE-ERR: error: instruction requires: mte
368// CHECK-NO-MTE-ERR: error: instruction requires: mte
369// CHECK-NO-MTE-ERR: error: instruction requires: mte
370// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
371// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
372// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
373// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
374setgm [x0]!, x1!, x2
375setgmt [x0]!, x1!, x2
376setgmn [x0]!, x1!, x2
377setgmtn [x0]!, x1!, x2
378
379// CHECK-MTE: [0x20,0x84,0xc2,0x1d]
380// CHECK-MTE: [0x20,0x94,0xc2,0x1d]
381// CHECK-MTE: [0x20,0xa4,0xc2,0x1d]
382// CHECK-MTE: [0x20,0xb4,0xc2,0x1d]
383// CHECK-NO-MTE-ERR: error: instruction requires: mte
384// CHECK-NO-MTE-ERR: error: instruction requires: mte
385// CHECK-NO-MTE-ERR: error: instruction requires: mte
386// CHECK-NO-MTE-ERR: error: instruction requires: mte
387// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
388// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
389// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
390// CHECK-NO-MOPSMTE-ERR: error: instruction requires: mops mte
391setge [x0]!, x1!, x2
392setget [x0]!, x1!, x2
393setgen [x0]!, x1!, x2
394setgetn [x0]!, x1!, x2
395
396// All operand must be different from each other
397
398// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same
399// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same
400// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same
401cpyfp [x0]!, [x0]!, x1!
402cpyfp [x0]!, [x1]!, x0!
403cpyfp [x1]!, [x0]!, x0!
404
405// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same
406// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same
407// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same
408cpyfm [x0]!, [x0]!, x1!
409cpyfm [x0]!, [x1]!, x0!
410cpyfm [x1]!, [x0]!, x0!
411
412// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same
413// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same
414// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same
415cpyfe [x0]!, [x0]!, x1!
416cpyfe [x0]!, [x1]!, x0!
417cpyfe [x1]!, [x0]!, x0!
418
419// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same
420// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same
421// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same
422cpyp [x0]!, [x0]!, x1!
423cpyp [x0]!, [x1]!, x0!
424cpyp [x1]!, [x0]!, x0!
425
426// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same
427// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same
428// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same
429cpym [x0]!, [x0]!, x1!
430cpym [x0]!, [x1]!, x0!
431cpym [x1]!, [x0]!, x0!
432
433// CHECK-ERROR: error: invalid CPY instruction, destination and source registers are the same
434// CHECK-ERROR: error: invalid CPY instruction, destination and size registers are the same
435// CHECK-ERROR: error: invalid CPY instruction, source and size registers are the same
436cpye [x0]!, [x0]!, x1!
437cpye [x0]!, [x1]!, x0!
438cpye [x1]!, [x0]!, x0!
439
440// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same
441// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same
442// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same
443setp [x0]!, x0!, x1
444setp [x0]!, x1!, x0
445setp [x1]!, x0!, x0
446
447// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same
448// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same
449// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same
450setm [x0]!, x0!, x1
451setm [x0]!, x1!, x0
452setm [x1]!, x0!, x0
453
454// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same
455// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same
456// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same
457sete [x0]!, x0!, x1
458sete [x0]!, x1!, x0
459sete [x1]!, x0!, x0
460
461// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same
462// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same
463// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same
464setgp [x0]!, x0!, x1
465setgp [x0]!, x1!, x0
466setgp [x1]!, x0!, x0
467
468// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same
469// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same
470// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same
471setgm [x0]!, x0!, x1
472setgm [x0]!, x1!, x0
473setgm [x1]!, x0!, x0
474
475// CHECK-ERROR: error: invalid SET instruction, destination and size registers are the same
476// CHECK-ERROR: error: invalid SET instruction, destination and source registers are the same
477// CHECK-ERROR: error: invalid SET instruction, source and size registers are the same
478setge [x0]!, x0!, x1
479setge [x0]!, x1!, x0
480setge [x1]!, x0!, x0
481
482// SP cannot be used as argument at any position
483
484// CHECK-ERROR: error: invalid operand for instruction
485// CHECK-ERROR: error: invalid operand for instruction
486// CHECK-ERROR: error: invalid operand for instruction
487cpyfp [sp]!, [x1]!, x2!
488cpyfp [x0]!, [sp]!, x2!
489cpyfp [x0]!, [x1]!, sp!
490
491// CHECK-ERROR: error: invalid operand for instruction
492// CHECK-ERROR: error: invalid operand for instruction
493// CHECK-ERROR: error: invalid operand for instruction
494cpyfm [sp]!, [x1]!, x2!
495cpyfm [x0]!, [sp]!, x2!
496cpyfm [x0]!, [x1]!, sp!
497
498// CHECK-ERROR: error: invalid operand for instruction
499// CHECK-ERROR: error: invalid operand for instruction
500// CHECK-ERROR: error: invalid operand for instruction
501cpyfe [sp]!, [x1]!, x2!
502cpyfe [x0]!, [sp]!, x2!
503cpyfe [x0]!, [x1]!, sp!
504
505// CHECK-ERROR: error: invalid operand for instruction
506// CHECK-ERROR: error: invalid operand for instruction
507// CHECK-ERROR: error: invalid operand for instruction
508cpyp [sp]!, [x2]!, x2!
509cpyp [x0]!, [sp]!, x2!
510cpyp [x0]!, [x1]!, sp!
511
512// CHECK-ERROR: error: invalid operand for instruction
513// CHECK-ERROR: error: invalid operand for instruction
514// CHECK-ERROR: error: invalid operand for instruction
515cpym [sp]!, [x2]!, x2!
516cpym [x0]!, [sp]!, x2!
517cpym [x0]!, [x1]!, sp!
518
519// CHECK-ERROR: error: invalid operand for instruction
520// CHECK-ERROR: error: invalid operand for instruction
521// CHECK-ERROR: error: invalid operand for instruction
522cpye [sp]!, [x2]!, x2!
523cpye [x0]!, [sp]!, x2!
524cpye [x0]!, [x1]!, sp!
525
526// CHECK-ERROR: error: invalid operand for instruction
527// CHECK-ERROR: error: invalid operand for instruction
528// CHECK-ERROR: error: invalid operand for instruction
529setp [sp]!, x1!, x2
530setp [x0]!, sp!, x2
531setp [x0]!, x1!, sp
532
533// CHECK-ERROR: error: invalid operand for instruction
534// CHECK-ERROR: error: invalid operand for instruction
535// CHECK-ERROR: error: invalid operand for instruction
536setm [sp]!, x1!, x2
537setm [x0]!, sp!, x2
538setm [x0]!, x1!, sp
539
540// CHECK-ERROR: error: invalid operand for instruction
541// CHECK-ERROR: error: invalid operand for instruction
542// CHECK-ERROR: error: invalid operand for instruction
543sete [sp]!, x1!, x2
544sete [x0]!, sp!, x2
545sete [x0]!, x1!, sp
546
547// CHECK-ERROR: error: invalid operand for instruction
548// CHECK-ERROR: error: invalid operand for instruction
549// CHECK-ERROR: error: invalid operand for instruction
550setgp [sp]!, x1!, x2
551setgp [x0]!, sp!, x2
552setgp [x0]!, x1!, sp
553
554// CHECK-ERROR: error: invalid operand for instruction
555// CHECK-ERROR: error: invalid operand for instruction
556// CHECK-ERROR: error: invalid operand for instruction
557setgm [sp]!, x1!, x2
558setgm [x0]!, sp!, x2
559setgm [x0]!, x1!, sp
560
561// CHECK-ERROR: error: invalid operand for instruction
562// CHECK-ERROR: error: invalid operand for instruction
563// CHECK-ERROR: error: invalid operand for instruction
564setge [sp]!, x1!, x2
565setge [x0]!, sp!, x2
566setge [x0]!, x1!, sp
567
568// XZR can only be used at:
569//  - the size operand in CPY.
570//  - the size or source operands in SET.
571
572// CHECK-ERROR: error: invalid operand for instruction
573// CHECK-ERROR: error: invalid operand for instruction
574// CHECK:       cpyfp [x0]!, [x1]!, xzr!
575cpyfp [xzr]!, [x1]!, x2!
576cpyfp [x0]!, [xzr]!, x2!
577cpyfp [x0]!, [x1]!, xzr!
578
579// CHECK-ERROR: error: invalid operand for instruction
580// CHECK-ERROR: error: invalid operand for instruction
581// CHECK:       cpyfm [x0]!, [x1]!, xzr!
582cpyfm [xzr]!, [x1]!, x2!
583cpyfm [x0]!, [xzr]!, x2!
584cpyfm [x0]!, [x1]!, xzr!
585
586// CHECK-ERROR: error: invalid operand for instruction
587// CHECK-ERROR: error: invalid operand for instruction
588// CHECK:       cpyfe [x0]!, [x1]!, xzr!
589cpyfe [xzr]!, [x1]!, x2!
590cpyfe [x0]!, [xzr]!, x2!
591cpyfe [x0]!, [x1]!, xzr!
592
593// CHECK-ERROR: error: invalid operand for instruction
594// CHECK-ERROR: error: invalid operand for instruction
595// CHECK:       cpyp [x0]!, [x1]!, xzr!
596cpyp [xzr]!, [x2]!, x2!
597cpyp [x0]!, [xzr]!, x2!
598cpyp [x0]!, [x1]!, xzr!
599
600// CHECK-ERROR: error: invalid operand for instruction
601// CHECK-ERROR: error: invalid operand for instruction
602// CHECK:       cpym [x0]!, [x1]!, xzr!
603cpym [xzr]!, [x2]!, x2!
604cpym [x0]!, [xzr]!, x2!
605cpym [x0]!, [x1]!, xzr!
606
607// CHECK-ERROR: error: invalid operand for instruction
608// CHECK-ERROR: error: invalid operand for instruction
609// CHECK:       cpye [x0]!, [x1]!, xzr!
610cpye [xzr]!, [x2]!, x2!
611cpye [x0]!, [xzr]!, x2!
612cpye [x0]!, [x1]!, xzr!
613
614// CHECK-ERROR: error: invalid operand for instruction
615// CHECK:       setp [x0]!, xzr!, x2
616// CHECK:       setp [x0]!, x1!, xzr
617setp [xzr]!, x1!, x2
618setp [x0]!, xzr!, x2
619setp [x0]!, x1!, xzr
620
621// CHECK-ERROR: error: invalid operand for instruction
622// CHECK:       setm [x0]!, xzr!, x2
623// CHECK:       setm [x0]!, x1!, xzr
624setm [xzr]!, x1!, x2
625setm [x0]!, xzr!, x2
626setm [x0]!, x1!, xzr
627
628// CHECK-ERROR: error: invalid operand for instruction
629// CHECK:       sete [x0]!, xzr!, x2
630// CHECK:       sete [x0]!, x1!, xzr
631sete [xzr]!, x1!, x2
632sete [x0]!, xzr!, x2
633sete [x0]!, x1!, xzr
634
635// CHECK-ERROR: error: invalid operand for instruction
636// CHECK-MTE:   setgp [x0]!, xzr!, x2
637// CHECK-MTE:   setgp [x0]!, x1!, xzr
638setgp [xzr]!, x1!, x2
639setgp [x0]!, xzr!, x2
640setgp [x0]!, x1!, xzr
641
642// CHECK-ERROR: error: invalid operand for instruction
643// CHECK-MTE:   setgm [x0]!, xzr!, x2
644// CHECK-MTE:   setgm [x0]!, x1!, xzr
645setgm [xzr]!, x1!, x2
646setgm [x0]!, xzr!, x2
647setgm [x0]!, x1!, xzr
648
649// CHECK-ERROR: error: invalid operand for instruction
650// CHECK-MTE:   setge [x0]!, xzr!, x2
651// CHECK-MTE:   setge [x0]!, x1!, xzr
652setge [xzr]!, x1!, x2
653setge [x0]!, xzr!, x2
654setge [x0]!, x1!, xzr
655