[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / AArch64 / armv8.5a-mte-error.s
blob07b4a19660d489e1f6f73b23c672d2a54712b79d
1 // RUN: not llvm-mc -triple aarch64 -show-encoding -mattr=+mte < %s 2>&1| FileCheck %s
3 irg
4 irg x0
5 irg q0, x0
6 irg w0, x0
7 irg x0, q0
8 irg x0, w0
9 irg x0, x1, q0
10 irg x0, x1, w0
11 irg x0, x1, sp
12 irg x0, x1, #1
13 irg x0, #1, x1
14 irg #1, x0, x1
15 irg x0, x1, x2, x3
17 // CHECK: too few operands for instruction
18 // CHECK-NEXT: irg
19 // CHECK: too few operands for instruction
20 // CHECK-NEXT: irg x0
21 // CHECK: invalid operand for instruction
22 // CHECK-NEXT: irg q0, x0
23 // CHECK: invalid operand for instruction
24 // CHECK-NEXT: irg w0, x0
25 // CHECK: invalid operand for instruction
26 // CHECK-NEXT: irg x0, q0
27 // CHECK: invalid operand for instruction
28 // CHECK-NEXT: irg x0, w0
29 // CHECK: invalid operand for instruction
30 // CHECK-NEXT: irg x0, x1, q0
31 // CHECK: invalid operand for instruction
32 // CHECK-NEXT: irg x0, x1, w0
33 // CHECK: invalid operand for instruction
34 // CHECK-NEXT: irg x0, x1, sp
35 // CHECK: invalid operand for instruction
36 // CHECK-NEXT: irg x0, x1, #1
37 // CHECK: invalid operand for instruction
38 // CHECK-NEXT: irg x0, #1, x1
39 // CHECK: invalid operand for instruction
40 // CHECK-NEXT: irg #1, x0, x1
41 // CHECK: invalid operand for instruction
42 // CHECK-NEXT: irg x0, x1, x2, x3
44 addg
45 addg x0
46 addg x0, x1
47 addg x0, x1, #0
48 addg x0, x1, #1024, #0
49 addg x0, x1, #8, #0
50 addg x0, x1, #-16, #0
51 addg x0, x1, #0, #16
52 addg q0, x1, #0, #0
53 addg w0, x1, #0, #0
54 addg x0, q1, #0, #0
55 addg x0, w1, #0, #0
56 addg #0, x1, #0, #0
57 addg x0, #0, #0, #0
58 addg x0, x1, x0, #0
59 addg x0, x1, #0, x0
60 addg x0, x1, #16, #2, #99
62 subg
63 subg x0
64 subg x0, x1
65 subg x0, x1, #0
66 subg x0, x1, #1024, #0
67 subg x0, x1, #8, #0
68 subg x0, x1, #-16, #0
69 subg x0, x1, #0, #16
70 subg q0, x1, #0, #0
71 subg w0, x1, #0, #0
72 subg x0, q1, #0, #0
73 subg x0, w1, #0, #0
74 subg #0, x1, #0, #0
75 subg x0, #0, #0, #0
76 subg x0, x1, x0, #0
77 subg x0, x1, #0, x0
78 subg x0, x1, #16, #2, #99
80 // CHECK: too few operands for instruction
81 // CHECK-NEXT: addg
82 // CHECK: too few operands for instruction
83 // CHECK-NEXT: addg x0
84 // CHECK: too few operands for instruction
85 // CHECK-NEXT: addg x0, x1
86 // CHECK: too few operands for instruction
87 // CHECK-NEXT: addg x0, x1, #0
88 // CHECK: index must be a multiple of 16 in range [0, 1008]
89 // CHECK-NEXT: addg x0, x1, #1024, #0
90 // CHECK: index must be a multiple of 16 in range [0, 1008]
91 // CHECK-NEXT: addg x0, x1, #8, #0
92 // CHECK: index must be a multiple of 16 in range [0, 1008]
93 // CHECK-NEXT: addg x0, x1, #-16, #0
94 // CHECK: immediate must be an integer in range [0, 15]
95 // CHECK-NEXT: addg x0, x1, #0, #16
96 // CHECK: invalid operand for instruction
97 // CHECK-NEXT: addg q0, x1, #0, #0
98 // CHECK: invalid operand for instruction
99 // CHECK-NEXT: addg w0, x1, #0, #0
100 // CHECK: invalid operand for instruction
101 // CHECK-NEXT: addg x0, q1, #0, #0
102 // CHECK: invalid operand for instruction
103 // CHECK-NEXT: addg x0, w1, #0, #0
104 // CHECK: invalid operand for instruction
105 // CHECK-NEXT: addg #0, x1, #0, #0
106 // CHECK: invalid operand for instruction
107 // CHECK-NEXT: addg x0, #0, #0, #0
108 // CHECK: invalid operand for instruction
109 // CHECK-NEXT: addg x0, x1, x0, #0
110 // CHECK: immediate must be an integer in range [0, 15]
111 // CHECK-NEXT: addg x0, x1, #0, x0
112 // CHECK: invalid operand for instruction
113 // CHECK-NEXT: addg x0, x1, #16, #2, #99
115 // CHECK: too few operands for instruction
116 // CHECK-NEXT: subg
117 // CHECK: too few operands for instruction
118 // CHECK-NEXT: subg x0
119 // CHECK: too few operands for instruction
120 // CHECK-NEXT: subg x0, x1
121 // CHECK: too few operands for instruction
122 // CHECK-NEXT: subg x0, x1, #0
123 // CHECK: index must be a multiple of 16 in range [0, 1008]
124 // CHECK-NEXT: subg x0, x1, #1024, #0
125 // CHECK: index must be a multiple of 16 in range [0, 1008]
126 // CHECK-NEXT: subg x0, x1, #8, #0
127 // CHECK: index must be a multiple of 16 in range [0, 1008]
128 // CHECK-NEXT: subg x0, x1, #-16, #0
129 // CHECK: immediate must be an integer in range [0, 15]
130 // CHECK-NEXT: subg x0, x1, #0, #16
131 // CHECK: invalid operand for instruction
132 // CHECK-NEXT: subg q0, x1, #0, #0
133 // CHECK: invalid operand for instruction
134 // CHECK-NEXT: subg w0, x1, #0, #0
135 // CHECK: invalid operand for instruction
136 // CHECK-NEXT: subg x0, q1, #0, #0
137 // CHECK: invalid operand for instruction
138 // CHECK-NEXT: subg x0, w1, #0, #0
139 // CHECK: invalid operand for instruction
140 // CHECK-NEXT: subg #0, x1, #0, #0
141 // CHECK: invalid operand for instruction
142 // CHECK-NEXT: subg x0, #0, #0, #0
143 // CHECK: invalid operand for instruction
144 // CHECK-NEXT: subg x0, x1, x0, #0
145 // CHECK: immediate must be an integer in range [0, 15]
146 // CHECK-NEXT: subg x0, x1, #0, x0
147 // CHECK: invalid operand for instruction
148 // CHECK-NEXT: subg x0, x1, #16, #2, #99
151 gmi x0
152 gmi x0, x1
153 gmi sp, x0, x1
154 gmi x0, x1, sp
155 gmi x0, x1, x2, #1
156 gmi w0, x1, x2
157 gmi x0, w1, x2
158 gmi x0, x1, w2
159 gmi #1, x1, x2
160 gmi x0, #1, x2
161 gmi x0, x1, #1
163 // CHECK: too few operands for instruction
164 // CHECK-NEXT: gmi
165 // CHECK: too few operands for instruction
166 // CHECK-NEXT: gmi x0
167 // CHECK: too few operands for instruction
168 // CHECK-NEXT: gmi x0, x1
169 // CHECK: invalid operand for instruction
170 // CHECK-NEXT: gmi sp, x0, x1
171 // CHECK: invalid operand for instruction
172 // CHECK-NEXT: gmi x0, x1, sp
173 // CHECK: invalid operand for instruction
174 // CHECK-NEXT: gmi x0, x1, x2, #1
175 // CHECK: invalid operand for instruction
176 // CHECK-NEXT: gmi w0, x1, x2
177 // CHECK: invalid operand for instruction
178 // CHECK-NEXT: gmi x0, w1, x2
179 // CHECK: invalid operand for instruction
180 // CHECK-NEXT: gmi x0, x1, w2
181 // CHECK: invalid operand for instruction
182 // CHECK-NEXT: gmi #1, x1, x2
183 // CHECK: invalid operand for instruction
184 // CHECK-NEXT: gmi x0, #1, x2
185 // CHECK: invalid operand for instruction
186 // CHECK-NEXT: gmi x0, x1, #1
188 stg x0
189 stg w0
190 stg sp
191 stg #1
192 stg x0, [x0, #-4112]
193 stg x0, [x0, #4096]
194 stg x0, [x0, #8]
195 stg x0, [x0, x1]
196 stg x0, [w0]
197 stg x0, [xzr]
198 stg x0, [#1]
200 // CHECK: too few operands for instruction
201 // CHECK-NEXT: stg
202 // CHECK: too few operands for instruction
203 // CHECK-NEXT: stg x0
204 // CHECK: invalid operand for instruction
205 // CHECK-NEXT: stg w0
206 // CHECK: too few operands for instruction
207 // CHECK-NEXT: stg sp
208 // CHECK: invalid operand for instruction
209 // CHECK-NEXT: stg #1
210 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
211 // CHECK-NEXT: #-4112
212 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
213 // CHECK-NEXT: #4096
214 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
215 // CHECK-NEXT: #8
216 // CHECK: invalid operand for instruction
217 // CHECK-NEXT: stg x0, [x0, x1]
218 // CHECK: invalid operand for instruction
219 // CHECK-NEXT: stg x0, [w0]
220 // CHECK: invalid operand for instruction
221 // CHECK-NEXT: stg x0, [xzr]
222 // CHECK: invalid operand for instruction
223 // CHECK-NEXT: stg x0, [#1]
225 stzg
226 stzg x0
227 stzg w0
228 stzg sp
229 stzg #1
230 stzg x0, [x0, #-4112]
231 stzg x0, [x0, #4096]
232 stzg x0, [x0, #8]
233 stzg x0, [x0, x1]
234 stzg x0, [w0]
235 stzg x0, [xzr]
236 stzg x0, [#1]
238 // CHECK: too few operands for instruction
239 // CHECK-NEXT: stzg
240 // CHECK: too few operands for instruction
241 // CHECK-NEXT: stzg x0
242 // CHECK: invalid operand for instruction
243 // CHECK-NEXT: stzg w0
244 // CHECK: too few operands for instruction
245 // CHECK-NEXT: stzg sp
246 // CHECK: invalid operand for instruction
247 // CHECK-NEXT: stzg #1
248 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
249 // CHECK-NEXT: #-4112
250 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
251 // CHECK-NEXT: #4096
252 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
253 // CHECK-NEXT: #8
254 // CHECK: invalid operand for instruction
255 // CHECK-NEXT: stzg x0, [x0, x1]
256 // CHECK: invalid operand for instruction
257 // CHECK-NEXT: stzg x0, [w0]
258 // CHECK: invalid operand for instruction
259 // CHECK-NEXT: stzg x0, [xzr]
260 // CHECK: invalid operand for instruction
261 // CHECK-NEXT: stzg x0, [#1]
263 stg x0, [x0, #-4112]!
264 stg x0, [x0, #4096]!
265 stg x0, [x0, #8]!
266 stg x0, [x0, x1]!
267 stg x0, [w0]!
268 stg x0, [xzr]!
269 stg x0, [#1]!
271 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
272 // CHECK-NEXT: #-4112
273 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
274 // CHECK-NEXT: #4096
275 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
276 // CHECK-NEXT: #8
277 // CHECK: invalid operand for instruction
278 // CHECK-NEXT: stg x0, [x0, x1]!
279 // CHECK: invalid operand for instruction
280 // CHECK-NEXT: stg x0, [w0]!
281 // CHECK: invalid operand for instruction
282 // CHECK-NEXT: stg x0, [xzr]!
283 // CHECK: invalid operand for instruction
284 // CHECK-NEXT: stg x0, [#1]!
286 stzg x0, [x0, #-4112]!
287 stzg x0, [x0, #4096]!
288 stzg x0, [x0, #8]!
289 stzg x0, [x0, x1]!
290 stzg x0, [w0]!
291 stzg x0, [xzr]!
292 stzg x0, [#1]!
294 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
295 // CHECK-NEXT: #-4112
296 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
297 // CHECK-NEXT: #4096
298 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
299 // CHECK-NEXT: #8
300 // CHECK: invalid operand for instruction
301 // CHECK-NEXT: stzg x0, [x0, x1]!
302 // CHECK: invalid operand for instruction
303 // CHECK-NEXT: stzg x0, [w0]!
304 // CHECK: invalid operand for instruction
305 // CHECK-NEXT: stzg x0, [xzr]!
306 // CHECK: invalid operand for instruction
307 // CHECK-NEXT: stzg x0, [#1]!
309 stg x0, [x0], #-4112
310 stg x0, [x0], #4096
311 stg x0, [x0], #8
312 stg x0, [x0], x1
313 stg x0, [w0], #255
314 stg x0, [xzr], #255
315 stg x0, [#1], #255
317 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
318 // CHECK-NEXT: #-4112
319 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
320 // CHECK-NEXT: #4096
321 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
322 // CHECK-NEXT: #8
323 // CHECK: invalid operand for instruction
324 // CHECK-NEXT: stg x0, [x0], x1
325 // CHECK: invalid operand for instruction
326 // CHECK-NEXT: stg x0, [w0], #255
327 // CHECK: invalid operand for instruction
328 // CHECK-NEXT: stg x0, [xzr], #255
329 // CHECK: invalid operand for instruction
330 // CHECK-NEXT: stg x0, [#1], #255
332 stzg x0, [x0], #-4112
333 stzg x0, [x0], #4096
334 stzg x0, [x0], #8
335 stzg x0, [x0], x1
336 stzg x0, [w0], #255
337 stzg x0, [xzr], #255
338 stzg x0, [#1], #255
340 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
341 // CHECK-NEXT: #-4112
342 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
343 // CHECK-NEXT: #4096
344 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
345 // CHECK-NEXT: #8
346 // CHECK: invalid operand for instruction
347 // CHECK-NEXT: stzg x0, [x0], x1
348 // CHECK: invalid operand for instruction
349 // CHECK-NEXT: stzg x0, [w0], #255
350 // CHECK: invalid operand for instruction
351 // CHECK-NEXT: stzg x0, [xzr], #255
352 // CHECK: invalid operand for instruction
353 // CHECK-NEXT: stzg x0, [#1], #255
355 st2g
356 st2g x0
357 st2g w0
358 st2g sp
359 st2g #1
360 st2g x0, [x0, #-4112]
361 st2g x0, [x0, #4096]
362 st2g x0, [x0, #8]
363 st2g x0, [x0, x1]
364 st2g x0, [w0]
365 st2g x0, [xzr]
366 st2g x0, [#1]
368 // CHECK: too few operands for instruction
369 // CHECK-NEXT: st2g
370 // CHECK: too few operands for instruction
371 // CHECK-NEXT: st2g x0
372 // CHECK: invalid operand for instruction
373 // CHECK-NEXT: st2g w0
374 // CHECK: too few operands for instruction
375 // CHECK-NEXT: st2g sp
376 // CHECK: invalid operand for instruction
377 // CHECK-NEXT: st2g #1
378 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
379 // CHECK-NEXT: #-4112
380 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
381 // CHECK-NEXT: #4096
382 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
383 // CHECK-NEXT: #8
384 // CHECK: invalid operand for instruction
385 // CHECK-NEXT: st2g x0, [x0, x1]
386 // CHECK: invalid operand for instruction
387 // CHECK-NEXT: st2g x0, [w0]
388 // CHECK: invalid operand for instruction
389 // CHECK-NEXT: st2g x0, [xzr]
390 // CHECK: invalid operand for instruction
391 // CHECK-NEXT: st2g x0, [#1]
393 stz2g
394 stz2g x0
395 stz2g w0
396 stz2g sp
397 stz2g #1
398 stz2g x0, [x0, #-4112]
399 stz2g x0, [x0, #4096]
400 stz2g x0, [x0, #8]
401 stz2g x0, [x0, x1]
402 stz2g x0, [w0]
403 stz2g x0, [xzr]
404 stz2g x0, [#1]
406 // CHECK: too few operands for instruction
407 // CHECK-NEXT: stz2g
408 // CHECK: too few operands for instruction
409 // CHECK-NEXT: stz2g x0
410 // CHECK: invalid operand for instruction
411 // CHECK-NEXT: stz2g w0
412 // CHECK: too few operands for instruction
413 // CHECK-NEXT: stz2g sp
414 // CHECK: invalid operand for instruction
415 // CHECK-NEXT: stz2g #1
416 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
417 // CHECK-NEXT: #-4112
418 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
419 // CHECK-NEXT: #4096
420 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
421 // CHECK-NEXT: #8
422 // CHECK: invalid operand for instruction
423 // CHECK-NEXT: stz2g x0, [x0, x1]
424 // CHECK: invalid operand for instruction
425 // CHECK-NEXT: stz2g x0, [w0]
426 // CHECK: invalid operand for instruction
427 // CHECK-NEXT: stz2g x0, [xzr]
428 // CHECK: invalid operand for instruction
429 // CHECK-NEXT: stz2g x0, [#1]
431 st2g x0, [x0, #-4112]!
432 st2g x0, [x0, #4096]!
433 st2g x0, [x0, #8]!
434 st2g x0, [x0, x1]!
435 st2g x0, [w0, #256]!
436 st2g x0, [xzr, #256]!
437 st2g x0, [#1, #256]!
439 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
440 // CHECK-NEXT: #-4112
441 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
442 // CHECK-NEXT: #4096
443 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
444 // CHECK-NEXT: #8
445 // CHECK: invalid operand for instruction
446 // CHECK-NEXT: st2g x0, [x0, x1]!
447 // CHECK: invalid operand for instruction
448 // CHECK-NEXT: st2g x0, [w0, #256]!
449 // CHECK: invalid operand for instruction
450 // CHECK-NEXT: st2g x0, [xzr, #256]!
451 // CHECK: invalid operand for instruction
452 // CHECK-NEXT: st2g x0, [#1, #256]!
454 stz2g x0, [x0, #-4112]!
455 stz2g x0, [x0, #4096]!
456 stz2g x0, [x0, #8]!
457 stz2g x0, [x0, x1]!
458 stz2g x0, [w0, #255]!
459 stz2g x0, [xzr, #255]!
460 stz2g x0, [#1, #255]!
462 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
463 // CHECK-NEXT: #-4112
464 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
465 // CHECK-NEXT: #4096
466 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
467 // CHECK-NEXT: #8
468 // CHECK: invalid operand for instruction
469 // CHECK-NEXT: stz2g x0, [x0, x1]!
470 // CHECK: invalid operand for instruction
471 // CHECK-NEXT: stz2g x0, [w0, #255]!
472 // CHECK: invalid operand for instruction
473 // CHECK-NEXT: stz2g x0, [xzr, #255]!
474 // CHECK: invalid operand for instruction
475 // CHECK-NEXT: stz2g x0, [#1, #255]!
477 st2g x0, [x0], #-4112
478 st2g x0, [x0], #4096
479 st2g x0, [x0], #8
480 st2g x0, [x0], x1
481 st2g x0, [w0], #255
482 st2g x0, [xzr], #255
483 st2g x0, [#1], #255
485 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
486 // CHECK-NEXT: #-4112
487 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
488 // CHECK-NEXT: #4096
489 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
490 // CHECK-NEXT: #8
491 // CHECK: invalid operand for instruction
492 // CHECK-NEXT: st2g x0, [x0], x1
493 // CHECK: invalid operand for instruction
494 // CHECK-NEXT: st2g x0, [w0], #255
495 // CHECK: invalid operand for instruction
496 // CHECK-NEXT: st2g x0, [xzr], #255
497 // CHECK: invalid operand for instruction
498 // CHECK-NEXT: st2g x0, [#1], #255
500 stz2g x0, [x0], #-4112
501 stz2g x0, [x0], #4096
502 stz2g x0, [x0], #8
503 stz2g x0, [x0], x1
504 stz2g x0, [w0], #255
505 stz2g x0, [xzr], #255
506 stz2g x0, [#1], #255
508 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
509 // CHECK-NEXT: #-4112
510 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
511 // CHECK-NEXT: #4096
512 // CHECK: index must be a multiple of 16 in range [-4096, 4080]
513 // CHECK-NEXT: #8
514 // CHECK: invalid operand for instruction
515 // CHECK-NEXT: stz2g x0, [x0], x1
516 // CHECK: invalid operand for instruction
517 // CHECK-NEXT: stz2g x0, [w0], #255
518 // CHECK: invalid operand for instruction
519 // CHECK-NEXT: stz2g x0, [xzr], #255
520 // CHECK: invalid operand for instruction
521 // CHECK-NEXT: stz2g x0, [#1], #255
523 stgp sp, x1, [x2, #16]
524 stgp x0, sp, [x2, #16]
525 stgp x0, x1, [xzr, #16]
526 stgp x0, x1, [x2, #-1040]
527 stgp x0, x1, [x2, #1024]
528 stgp x0, x1, [x2, #8]
529 stgp x0, x1, [x2, x3]
530 stgp w0, x1, [x2, #1]
531 stgp x0, w1, [x2, #1]
532 stgp x0, x1, [w2, #1]
533 stgp #1, x1, [x3, #1]
534 stgp x0, #1, [x3, #1]
535 stgp x0, x1, [#1, #1]
537 // CHECK: invalid operand for instruction
538 // CHECK-NEXT: stgp sp
539 // CHECK: invalid operand for instruction
540 // CHECK-NEXT: stgp x0, sp
541 // CHECK: invalid operand for instruction
542 // CHECK-NEXT: stgp x0, x1, [xzr
543 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
544 // CHECK-NEXT: #-1040
545 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
546 // CHECK-NEXT: #1024
547 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
548 // CHECK-NEXT: #8
549 // CHECK: invalid operand for instruction
550 // CHECK-NEXT: stgp x0, x1, [x2, x3]
551 // CHECK: invalid operand for instruction
552 // CHECK-NEXT: stgp w0, x1, [x2, #1]
553 // CHECK: invalid operand for instruction
554 // CHECK-NEXT: stgp x0, w1, [x2, #1]
555 // CHECK: invalid operand for instruction
556 // CHECK-NEXT: stgp x0, x1, [w2, #1]
557 // CHECK: invalid operand for instruction
558 // CHECK-NEXT: stgp #1, x1, [x3, #1]
559 // CHECK: invalid operand for instruction
560 // CHECK-NEXT: stgp x0, #1, [x3, #1]
561 // CHECK: invalid operand for instruction
562 // CHECK-NEXT: stgp x0, x1, [#1, #1]
564 stgp sp, x1, [x2, #16]!
565 stgp x0, sp, [x2, #16]!
566 stgp x0, x1, [xzr, #16]!
567 stgp x0, x1, [x2, #-1040]!
568 stgp x0, x1, [x2, #1024]!
569 stgp x0, x1, [x2, #8]!
570 stgp x0, x1, [x2, x3]!
571 stgp w0, x1, [x2, #1]!
572 stgp x0, w1, [x2, #1]!
573 stgp x0, x1, [w2, #1]!
574 stgp #1, x1, [x3, #1]!
575 stgp x0, #1, [x3, #1]!
576 stgp x0, x1, [#1, #1]!
578 // CHECK: invalid operand for instruction
579 // CHECK-NEXT: stgp sp
580 // CHECK: invalid operand for instruction
581 // CHECK-NEXT: stgp x0, sp
582 // CHECK: invalid operand for instruction
583 // CHECK-NEXT: stgp x0, x1, [xzr
584 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
585 // CHECK-NEXT: #-1040
586 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
587 // CHECK-NEXT: #1024
588 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
589 // CHECK-NEXT: #8
590 // CHECK: invalid operand for instruction
591 // CHECK-NEXT: stgp x0, x1, [x2, x3]!
592 // CHECK: invalid operand for instruction
593 // CHECK-NEXT: stgp w0, x1, [x2, #1]!
594 // CHECK: invalid operand for instruction
595 // CHECK-NEXT: stgp x0, w1, [x2, #1]!
596 // CHECK: invalid operand for instruction
597 // CHECK-NEXT: stgp x0, x1, [w2, #1]!
598 // CHECK: invalid operand for instruction
599 // CHECK-NEXT: stgp #1, x1, [x3, #1]!
600 // CHECK: invalid operand for instruction
601 // CHECK-NEXT: stgp x0, #1, [x3, #1]!
602 // CHECK: invalid operand for instruction
603 // CHECK-NEXT: stgp x0, x1, [#1, #1]!
605 stgp sp, x1, [x2], #16
606 stgp x0, sp, [x2], #16
607 stgp x0, x1, [xzr], #16
608 stgp x0, x1, [x2], #-1040
609 stgp x0, x1, [x2], #1024
610 stgp x0, x1, [x2], #8
611 stgp x0, x1, [x2], x3
612 stgp w0, x1, [x2], #1
613 stgp x0, w1, [x2], #1
614 stgp x0, x1, [w2], #1
615 stgp #1, x1, [x2], #1
616 stgp x0, #1, [x2], #1
617 stgp x0, x1, [#1], #1
619 // CHECK: invalid operand for instruction
620 // CHECK-NEXT: stgp sp
621 // CHECK: invalid operand for instruction
622 // CHECK-NEXT: stgp x0, sp
623 // CHECK: invalid operand for instruction
624 // CHECK-NEXT: stgp x0, x1, [xzr
625 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
626 // CHECK-NEXT: #-1040
627 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
628 // CHECK-NEXT: #1024
629 // CHECK: index must be a multiple of 16 in range [-1024, 1008]
630 // CHECK-NEXT: #8
631 // CHECK: invalid operand for instruction
632 // CHECK-NEXT: stgp x0, x1, [x2], x3
633 // CHECK: invalid operand for instruction
634 // CHECK-NEXT: stgp w0, x1, [x2], #1
635 // CHECK: invalid operand for instruction
636 // CHECK-NEXT: stgp x0, w1, [x2], #1
637 // CHECK: invalid operand for instruction
638 // CHECK-NEXT: stgp x0, x1, [w2], #1
639 // CHECK: invalid operand for instruction
640 // CHECK-NEXT: stgp #1, x1, [x2], #1
641 // CHECK: invalid operand for instruction
642 // CHECK-NEXT: stgp x0, #1, [x2], #1
643 // CHECK: invalid operand for instruction
644 // CHECK-NEXT: stgp x0, x1, [#1], #1
646 mrs tco
647 mrs gcr_el1
648 mrs rgsr_el1
649 mrs tfsr_el1
650 mrs tfsr_el2
651 mrs tfsr_el3
652 mrs tfsr_el12
653 mrs tfsre0_el1
654 mrs gmid_el1
656 // CHECK: invalid operand for instruction
657 // CHECK-NEXT: tco
658 // CHECK: invalid operand for instruction
659 // CHECK-NEXT: gcr_el1
660 // CHECK: invalid operand for instruction
661 // CHECK-NEXT: rgsr_el1
662 // CHECK: invalid operand for instruction
663 // CHECK-NEXT: tfsr_el1
664 // CHECK: invalid operand for instruction
665 // CHECK-NEXT: tfsr_el2
666 // CHECK: invalid operand for instruction
667 // CHECK-NEXT: tfsr_el3
668 // CHECK: invalid operand for instruction
669 // CHECK-NEXT: tfsr_el12
670 // CHECK: invalid operand for instruction
671 // CHECK-NEXT: tfsre0_el1
672 // CHECK: invalid operand for instruction
673 // CHECK-NEXT: gmid_el1
675 mrs tco, #0
676 mrs tco, x0
677 mrs gcr_el1, x1
678 mrs rgsr_el1, x2
679 mrs tfsr_el1, x3
680 mrs tfsr_el2, x4
681 mrs tfsr_el3, x5
682 mrs tfsr_el12, x6
683 mrs tfsre0_el1, x7
684 mrs gmid_el1, x7
686 // CHECK: invalid operand for instruction
687 // CHECK-NEXT: tco, #0
688 // CHECK: invalid operand for instruction
689 // CHECK-NEXT: tco, x0
690 // CHECK: invalid operand for instruction
691 // CHECK-NEXT: gcr_el1
692 // CHECK: invalid operand for instruction
693 // CHECK-NEXT: rgsr_el1
694 // CHECK: invalid operand for instruction
695 // CHECK-NEXT: tfsr_el1
696 // CHECK: invalid operand for instruction
697 // CHECK-NEXT: tfsr_el2
698 // CHECK: invalid operand for instruction
699 // CHECK-NEXT: tfsr_el3
700 // CHECK: invalid operand for instruction
701 // CHECK-NEXT: tfsr_el12
702 // CHECK: invalid operand for instruction
703 // CHECK-NEXT: tfsre0_el1
704 // CHECK: invalid operand for instruction
705 // CHECK-NEXT: gmid_el1
707 msr tco
708 msr gcr_el1
709 msr rgsr_el1
710 msr tfsr_el1
711 msr tfsr_el2
712 msr tfsr_el3
713 msr tfsr_el12
714 msr tfsre0_el1
715 msr gmid_el1
717 // CHECK: too few operands for instruction
718 // CHECK-NEXT: tco
719 // CHECK: too few operands for instruction
720 // CHECK-NEXT: gcr_el1
721 // CHECK: too few operands for instruction
722 // CHECK-NEXT: rgsr_el1
723 // CHECK: too few operands for instruction
724 // CHECK-NEXT: tfsr_el1
725 // CHECK: too few operands for instruction
726 // CHECK-NEXT: tfsr_el2
727 // CHECK: too few operands for instruction
728 // CHECK-NEXT: tfsr_el3
729 // CHECK: too few operands for instruction
730 // CHECK-NEXT: tfsr_el12
731 // CHECK: too few operands for instruction
732 // CHECK-NEXT: tfsre0_el1
733 // CHECK: expected writable system register or pstate
734 // CHECK-NEXT: gmid_el1
736 msr x0, tco
737 msr x1, gcr_el1
738 msr x2, rgsr_el1
739 msr x3, tfsr_el1
740 msr x4, tfsr_el2
741 msr x5, tfsr_el3
742 msr x6, tfsr_el12
743 msr x7, tfsre0_el1
744 msr x7, gmid_el1
746 // CHECK: expected writable system register or pstate
747 // CHECK-NEXT: tco
748 // CHECK: expected writable system register or pstate
749 // CHECK-NEXT: gcr_el1
750 // CHECK: expected writable system register or pstate
751 // CHECK-NEXT: rgsr_el1
752 // CHECK: expected writable system register or pstate
753 // CHECK-NEXT: tfsr_el1
754 // CHECK: expected writable system register or pstate
755 // CHECK-NEXT: tfsr_el2
756 // CHECK: expected writable system register or pstate
757 // CHECK-NEXT: tfsr_el3
758 // CHECK: expected writable system register or pstate
759 // CHECK-NEXT: tfsr_el12
760 // CHECK: expected writable system register or pstate
761 // CHECK-NEXT: tfsre0_el1
762 // CHECK: expected writable system register or pstate
763 // CHECK-NEXT: gmid_el1
765 msr gmid_el1, x7
767 // CHECK: expected writable system register or pstate
768 // CHECK-NEXT: gmid_el1
770 // Among the system registers added by MTE, only TCO can be used with MSR (imm).
771 // The rest can only be used with MSR (reg).
772 msr gcr_el1, #1
773 msr rgsr_el1, #2
774 msr tfsr_el1, #3
775 msr tfsr_el2, #4
776 msr tfsr_el3, #5
777 msr tfsr_el12, #6
778 msr tfsre0_el1, #7
779 // Is read only
780 msr gmid_el1, #7
782 // CHECK: invalid operand for instruction
783 // CHECK-NEXT: gcr_el1
784 // CHECK: invalid operand for instruction
785 // CHECK-NEXT: rgsr_el1
786 // CHECK: invalid operand for instruction
787 // CHECK-NEXT: tfsr_el1
788 // CHECK: invalid operand for instruction
789 // CHECK-NEXT: tfsr_el2
790 // CHECK: invalid operand for instruction
791 // CHECK-NEXT: tfsr_el3
792 // CHECK: invalid operand for instruction
793 // CHECK-NEXT: tfsr_el12
794 // CHECK: invalid operand for instruction
795 // CHECK-NEXT: tfsre0_el1
796 // CHECK: expected writable system register or pstate
797 // CHECK-NEXT: gmid_el1
799 // Xd cannot be the stack pointer, the rest can
800 subps sp, x0, x1
801 subp sp, x2, x3
802 subp w0, x1, x2
803 subp x0, w1, x2
804 subp x0, x1, w2
805 subps w0, x1, x2
806 subps x0, w1, x2
807 subps x0, x1, w2
808 subp #1, x1, x2
809 subp x0, #1, x2
810 subp x0, x1, #1
811 subps #1, x1, x2
812 subps x0, #1, x2
813 subps x0, x1, #1
815 // CHECK: invalid operand for instruction
816 // CHECK-NEXT: sp
817 // CHECK: invalid operand for instruction
818 // CHECK-NEXT: sp
819 // CHECK: invalid operand for instruction
820 // CHECK-NEXT: subp w0, x1, x2
821 // CHECK: invalid operand for instruction
822 // CHECK-NEXT: subp x0, w1, x2
823 // CHECK: invalid operand for instruction
824 // CHECK-NEXT: subp x0, x1, w2
825 // CHECK: invalid operand for instruction
826 // CHECK-NEXT: subps w0, x1, x2
827 // CHECK: invalid operand for instruction
828 // CHECK-NEXT: subps x0, w1, x2
829 // CHECK: invalid operand for instruction
830 // CHECK-NEXT: subps x0, x1, w2
831 // CHECK: invalid operand for instruction
832 // CHECK-NEXT: subp #1, x1, x2
833 // CHECK: invalid operand for instruction
834 // CHECK-NEXT: subp x0, #1, x2
835 // CHECK: invalid operand for instruction
836 // CHECK-NEXT: subp x0, x1, #1
837 // CHECK: invalid operand for instruction
838 // CHECK-NEXT: subps #1, x1, x2
839 // CHECK: invalid operand for instruction
840 // CHECK-NEXT: subps x0, #1, x2
841 // CHECK: invalid operand for instruction
842 // CHECK-NEXT: subps x0, x1, #1
844 subps x0, x1, x2, x3
845 subp x0, x1, x2, x3
847 // CHECK: invalid operand for instruction
848 // CHECK-NEXT: subps x0, x1, x2, x3
849 // CHECK: invalid operand for instruction
850 // CHECK-NEXT: subp x0, x1, x2, x3
852 subps
853 subp
854 cmpp
855 subps x0
856 subp x0
857 cmpp x0
858 subps x0, x1
859 subp x0, x1
861 // CHECK: too few operands for instruction
862 // CHECK-NEXT: subps
863 // CHECK: too few operands for instruction
864 // CHECK-NEXT: subp
865 // CHECK: too few operands for instruction
866 // CHECK-NEXT: cmpp
867 // CHECK: too few operands for instruction
868 // CHECK-NEXT: subps x0
869 // CHECK: too few operands for instruction
870 // CHECK-NEXT: subp x0
871 // CHECK: too few operands for instruction
872 // CHECK-NEXT: cmpp x0
873 // CHECK: too few operands for instruction
874 // CHECK-NEXT: subps x0, x1
875 // CHECK: too few operands for instruction
876 // CHECK-NEXT: subp x0, x1
878 ldg sp, [x0, #0]
879 ldg x0, [x0, x0]
880 ldg x0, [x0, #4096]
881 ldg x0, [x0, #-4112]
882 ldg #1, [x0, #255]
883 ldg x0, [#1, #255]
885 // CHECK: invalid operand for instruction
886 // CHECK-NEXT: ldg sp, [x0, #0]
887 // CHECK: invalid operand for instruction
888 // CHECK-NEXT: ldg x0, [x0, x0]
889 // CHECK: index must be a multiple of 16 in range [-4096, 4080].
890 // CHECK-NEXT: ldg x0, [x0, #4096]
891 // CHECK: index must be a multiple of 16 in range [-4096, 4080].
892 // CHECK-NEXT: ldg x0, [x0, #-4112]
893 // CHECK: invalid operand for instruction
894 // CHECK-NEXT: ldg #1, [x0, #255]
895 // CHECK: invalid operand for instruction
896 // CHECK-NEXT: ldg x0, [#1, #255]
899 ldg x0
900 ldg x0, [#0]
901 ldg w0, [x1]
902 ldg x0, [w1]
904 // CHECK: too few operands for instruction
905 // CHECK-NEXT: ldg
906 // CHECK: too few operands for instruction
907 // CHECK-NEXT: ldg x0
908 // CHECK: invalid operand for instruction
909 // CHECK-NEXT: ldg x0, [#0]
910 // CHECK: invalid operand for instruction
911 // CHECK-NEXT: ldg w0, [x1]
912 // CHECK: invalid operand for instruction
913 // CHECK-NEXT: ldg x0, [w1]
915 ldgm
916 ldgm x0
917 ldgm w0, [x1]
918 ldgm x0, [w1]
919 ldgm #1, [x1]
920 ldgm x0, [#1]
921 ldgm sp, [x0]
923 // CHECK: too few operands for instruction
924 // CHECK-NEXT: ldgm
925 // CHECK: too few operands for instruction
926 // CHECK-NEXT: ldgm x0
927 // CHECK: invalid operand for instruction
928 // CHECK-NEXT: ldgm w0, [x1]
929 // CHECK: invalid operand for instruction
930 // CHECK-NEXT: ldgm x0, [w1]
931 // CHECK: invalid operand for instruction
932 // CHECK-NEXT: ldgm #1, [x1]
933 // CHECK: invalid operand for instruction
934 // CHECK-NEXT: ldgm x0, [#1]
935 // CHECK: invalid operand for instruction
936 // CHECK-NEXT: ldgm sp, [x0]
938 stgm
939 stgm x0
940 stgm sp, [x0]
941 stgm w0, [x0]
942 stgm x0, [w0]
943 stgm #1, [x1]
944 stgm x0, [#1]
946 // CHECK: too few operands for instruction
947 // CHECK-NEXT: stgm
948 // CHECK: too few operands for instruction
949 // CHECK-NEXT: stgm x0
950 // CHECK: invalid operand for instruction
951 // CHECK-NEXT: stgm sp, [x0]
952 // CHECK: invalid operand for instruction
953 // CHECK-NEXT: stgm w0, [x0]
954 // CHECK: invalid operand for instruction
955 // CHECK-NEXT: stgm x0, [w0]
956 // CHECK: invalid operand for instruction
957 // CHECK-NEXT: stgm #1, [x1]
958 // CHECK: invalid operand for instruction
959 // CHECK-NEXT: stgm x0, [#1]
961 stzgm
962 stzgm x0
963 stzgm sp, [x0]
964 stzgm w0, [x0]
965 stzgm x0, [w0]
966 stzgm #1, [x1]
967 stzgm x0, [#1]
969 // CHECK: too few operands for instruction
970 // CHECK-NEXT: stzgm
971 // CHECK: too few operands for instruction
972 // CHECK-NEXT: stzgm x0
973 // CHECK: invalid operand for instruction
974 // CHECK-NEXT: stzgm sp, [x0]
975 // CHECK: invalid operand for instruction
976 // CHECK-NEXT: stzgm w0, [x0]
977 // CHECK: invalid operand for instruction
978 // CHECK-NEXT: stzgm x0, [w0]
979 // CHECK: invalid operand for instruction
980 // CHECK-NEXT: stzgm #1, [x1]
981 // CHECK: invalid operand for instruction
982 // CHECK-NEXT: stzgm x0, [#1]