1 // RPRFM is now
a v8.0
a optional instruction
, and overlaps with PRFM. This test
2 // checks we can assemble as PRFM
, and we always disassemble as RPRFM.
4 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
--print-imm-hex
=false
< %s \
5 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
6 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
< %s \
7 // RUN
: | llvm-objdump
-d
--print-imm-hex
=false
- | FileCheck
%s
--check-prefix
=CHECK-INST
8 // Disassemble encoding
and check the re-encoding
(-show-encoding
) matches.
9 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
< %s \
10 // RUN
: | sed
'/.text/d' | sed
's/.*encoding: //g' \
11 // RUN
: | llvm-mc
-triple
=aarch64
-disassemble
-show-encoding
--print-imm-hex
=false \
12 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
15 // CHECK-INST
: rprfm pldkeep
, x0
, [x0
]
16 // CHECK-ENCODING
: [0x18,0x48,0xa0,0xf8]
19 // CHECK-INST
: rprfm pstkeep
, x0
, [x0
]
20 // CHECK-ENCODING
: [0x19,0x48,0xa0,0xf8]
23 // CHECK-INST
: rprfm
#2, x0, [x0]
24 // CHECK-ENCODING
: [0x1a,0x48,0xa0,0xf8]
27 // CHECK-INST
: rprfm
#3, x0, [x0]
28 // CHECK-ENCODING
: [0x1b,0x48,0xa0,0xf8]
31 // CHECK-INST
: rprfm pldstrm
, x0
, [x0
]
32 // CHECK-ENCODING
: [0x1c,0x48,0xa0,0xf8]
35 // CHECK-INST
: rprfm pststrm
, x0
, [x0
]
36 // CHECK-ENCODING
: [0x1d,0x48,0xa0,0xf8]
39 // CHECK-INST
: rprfm
#6, x0, [x0]
40 // CHECK-ENCODING
: [0x1e,0x48,0xa0,0xf8]
43 // CHECK-INST
: rprfm
#7, x0, [x0]
44 // CHECK-ENCODING
: [0x1f,0x48,0xa0,0xf8]
47 // CHECK-INST
: rprfm
#8, x0, [x0]
48 // CHECK-ENCODING
: [0x18,0x58,0xa0,0xf8]
51 // CHECK-INST
: rprfm
#9, x0, [x0]
52 // CHECK-ENCODING
: [0x19,0x58,0xa0,0xf8]
55 // CHECK-INST
: rprfm
#10, x0, [x0]
56 // CHECK-ENCODING
: [0x1a,0x58,0xa0,0xf8]
59 // CHECK-INST
: rprfm
#11, x0, [x0]
60 // CHECK-ENCODING
: [0x1b,0x58,0xa0,0xf8]
63 // CHECK-INST
: rprfm
#12, x0, [x0]
64 // CHECK-ENCODING
: [0x1c,0x58,0xa0,0xf8]
67 // CHECK-INST
: rprfm
#13, x0, [x0]
68 // CHECK-ENCODING
: [0x1d,0x58,0xa0,0xf8]
71 // CHECK-INST
: rprfm
#14, x0, [x0]
72 // CHECK-ENCODING
: [0x1e,0x58,0xa0,0xf8]
75 // CHECK-INST
: rprfm
#15, x0, [x0]
76 // CHECK-ENCODING
: [0x1f,0x58,0xa0,0xf8]
79 // CHECK-INST
: rprfm
#16, x0, [x0]
80 // CHECK-ENCODING
: [0x18,0x68,0xa0,0xf8]
83 // CHECK-INST
: rprfm
#17, x0, [x0]
84 // CHECK-ENCODING
: [0x19,0x68,0xa0,0xf8]
87 // CHECK-INST
: rprfm
#18, x0, [x0]
88 // CHECK-ENCODING
: [0x1a,0x68,0xa0,0xf8]
91 // CHECK-INST
: rprfm
#19, x0, [x0]
92 // CHECK-ENCODING
: [0x1b,0x68,0xa0,0xf8]
95 // CHECK-INST
: rprfm
#20, x0, [x0]
96 // CHECK-ENCODING
: [0x1c,0x68,0xa0,0xf8]
99 // CHECK-INST
: rprfm
#21, x0, [x0]
100 // CHECK-ENCODING
: [0x1d,0x68,0xa0,0xf8]
103 // CHECK-INST
: rprfm
#22, x0, [x0]
104 // CHECK-ENCODING
: [0x1e,0x68,0xa0,0xf8]
107 // CHECK-INST
: rprfm
#23, x0, [x0]
108 // CHECK-ENCODING
: [0x1f,0x68,0xa0,0xf8]
111 // CHECK-INST
: rprfm
#24, x0, [x0]
112 // CHECK-ENCODING
: [0x18,0x78,0xa0,0xf8]
115 // CHECK-INST
: rprfm
#25, x0, [x0]
116 // CHECK-ENCODING
: [0x19,0x78,0xa0,0xf8]
119 // CHECK-INST
: rprfm
#26, x0, [x0]
120 // CHECK-ENCODING
: [0x1a,0x78,0xa0,0xf8]
123 // CHECK-INST
: rprfm
#27, x0, [x0]
124 // CHECK-ENCODING
: [0x1b,0x78,0xa0,0xf8]
127 // CHECK-INST
: rprfm
#28, x0, [x0]
128 // CHECK-ENCODING
: [0x1c,0x78,0xa0,0xf8]
131 // CHECK-INST
: rprfm
#29, x0, [x0]
132 // CHECK-ENCODING
: [0x1d,0x78,0xa0,0xf8]
135 // CHECK-INST
: rprfm
#30, x0, [x0]
136 // CHECK-ENCODING
: [0x1e,0x78,0xa0,0xf8]
139 // CHECK-INST
: rprfm
#31, x0, [x0]
140 // CHECK-ENCODING
: [0x1f,0x78,0xa0,0xf8]
143 // CHECK-INST
: rprfm
#32, x0, [x0]
144 // CHECK-ENCODING
: [0x18,0xc8,0xa0,0xf8]
147 // CHECK-INST
: rprfm
#33, x0, [x0]
148 // CHECK-ENCODING
: [0x19,0xc8,0xa0,0xf8]
151 // CHECK-INST
: rprfm
#34, x0, [x0]
152 // CHECK-ENCODING
: [0x1a,0xc8,0xa0,0xf8]
155 // CHECK-INST
: rprfm
#35, x0, [x0]
156 // CHECK-ENCODING
: [0x1b,0xc8,0xa0,0xf8]
159 // CHECK-INST
: rprfm
#36, x0, [x0]
160 // CHECK-ENCODING
: [0x1c,0xc8,0xa0,0xf8]
163 // CHECK-INST
: rprfm
#37, x0, [x0]
164 // CHECK-ENCODING
: [0x1d,0xc8,0xa0,0xf8]
167 // CHECK-INST
: rprfm
#38, x0, [x0]
168 // CHECK-ENCODING
: [0x1e,0xc8,0xa0,0xf8]
171 // CHECK-INST
: rprfm
#39, x0, [x0]
172 // CHECK-ENCODING
: [0x1f,0xc8,0xa0,0xf8]
175 // CHECK-INST
: rprfm
#40, x0, [x0]
176 // CHECK-ENCODING
: [0x18,0xd8,0xa0,0xf8]
179 // CHECK-INST
: rprfm
#41, x0, [x0]
180 // CHECK-ENCODING
: [0x19,0xd8,0xa0,0xf8]
183 // CHECK-INST
: rprfm
#42, x0, [x0]
184 // CHECK-ENCODING
: [0x1a,0xd8,0xa0,0xf8]
187 // CHECK-INST
: rprfm
#43, x0, [x0]
188 // CHECK-ENCODING
: [0x1b,0xd8,0xa0,0xf8]
191 // CHECK-INST
: rprfm
#44, x0, [x0]
192 // CHECK-ENCODING
: [0x1c,0xd8,0xa0,0xf8]
195 // CHECK-INST
: rprfm
#45, x0, [x0]
196 // CHECK-ENCODING
: [0x1d,0xd8,0xa0,0xf8]
199 // CHECK-INST
: rprfm
#46, x0, [x0]
200 // CHECK-ENCODING
: [0x1e,0xd8,0xa0,0xf8]
203 // CHECK-INST
: rprfm
#47, x0, [x0]
204 // CHECK-ENCODING
: [0x1f,0xd8,0xa0,0xf8]
207 // CHECK-INST
: rprfm
#48, x0, [x0]
208 // CHECK-ENCODING
: [0x18,0xe8,0xa0,0xf8]
211 // CHECK-INST
: rprfm
#49, x0, [x0]
212 // CHECK-ENCODING
: [0x19,0xe8,0xa0,0xf8]
215 // CHECK-INST
: rprfm
#50, x0, [x0]
216 // CHECK-ENCODING
: [0x1a,0xe8,0xa0,0xf8]
219 // CHECK-INST
: rprfm
#51, x0, [x0]
220 // CHECK-ENCODING
: [0x1b,0xe8,0xa0,0xf8]
223 // CHECK-INST
: rprfm
#52, x0, [x0]
224 // CHECK-ENCODING
: [0x1c,0xe8,0xa0,0xf8]
227 // CHECK-INST
: rprfm
#53, x0, [x0]
228 // CHECK-ENCODING
: [0x1d,0xe8,0xa0,0xf8]
231 // CHECK-INST
: rprfm
#54, x0, [x0]
232 // CHECK-ENCODING
: [0x1e,0xe8,0xa0,0xf8]
235 // CHECK-INST
: rprfm
#55, x0, [x0]
236 // CHECK-ENCODING
: [0x1f,0xe8,0xa0,0xf8]
239 // CHECK-INST
: rprfm
#56, x0, [x0]
240 // CHECK-ENCODING
: [0x18,0xf8,0xa0,0xf8]
243 // CHECK-INST
: rprfm
#57, x0, [x0]
244 // CHECK-ENCODING
: [0x19,0xf8,0xa0,0xf8]
247 // CHECK-INST
: rprfm
#58, x0, [x0]
248 // CHECK-ENCODING
: [0x1a,0xf8,0xa0,0xf8]
251 // CHECK-INST
: rprfm
#59, x0, [x0]
252 // CHECK-ENCODING
: [0x1b,0xf8,0xa0,0xf8]
255 // CHECK-INST
: rprfm
#60, x0, [x0]
256 // CHECK-ENCODING
: [0x1c,0xf8,0xa0,0xf8]
259 // CHECK-INST
: rprfm
#61, x0, [x0]
260 // CHECK-ENCODING
: [0x1d,0xf8,0xa0,0xf8]
263 // CHECK-INST
: rprfm
#62, x0, [x0]
264 // CHECK-ENCODING
: [0x1e,0xf8,0xa0,0xf8]
267 // CHECK-INST
: rprfm
#63, x0, [x0]
268 // CHECK-ENCODING
: [0x1f,0xf8,0xa0,0xf8]
271 // -----------------------------------------------------------------------------
273 prfm
#24, [x0, w0, uxtw]
274 // CHECK-INST
: rprfm pldkeep
, x0
, [x0
]
275 // CHECK-ENCODING
: [0x18,0x48,0xa0,0xf8]
277 prfm
#25, [x0, w0, uxtw]
278 // CHECK-INST
: rprfm pstkeep
, x0
, [x0
]
279 // CHECK-ENCODING
: [0x19,0x48,0xa0,0xf8]
281 prfm
#26, [x0, w0, uxtw]
282 // CHECK-INST
: rprfm
#2, x0, [x0]
283 // CHECK-ENCODING
: [0x1a,0x48,0xa0,0xf8]
285 prfm
#27, [x0, w0, uxtw]
286 // CHECK-INST
: rprfm
#3, x0, [x0]
287 // CHECK-ENCODING
: [0x1b,0x48,0xa0,0xf8]
289 prfm
#28, [x0, w0, uxtw]
290 // CHECK-INST
: rprfm pldstrm
, x0
, [x0
]
291 // CHECK-ENCODING
: [0x1c,0x48,0xa0,0xf8]
293 prfm
#29, [x0, w0, uxtw]
294 // CHECK-INST
: rprfm pststrm
, x0
, [x0
]
295 // CHECK-ENCODING
: [0x1d,0x48,0xa0,0xf8]
297 prfm
#30, [x0, w0, uxtw]
298 // CHECK-INST
: rprfm
#6, x0, [x0]
299 // CHECK-ENCODING
: [0x1e,0x48,0xa0,0xf8]
301 prfm
#31, [x0, w0, uxtw]
302 // CHECK-INST
: rprfm
#7, x0, [x0]
303 // CHECK-ENCODING
: [0x1f,0x48,0xa0,0xf8]
305 prfm
#24, [x0, w0, uxtw #3]
306 // CHECK-INST
: rprfm
#8, x0, [x0]
307 // CHECK-ENCODING
: [0x18,0x58,0xa0,0xf8]
309 prfm
#25, [x0, w0, uxtw #3]
310 // CHECK-INST
: rprfm
#9, x0, [x0]
311 // CHECK-ENCODING
: [0x19,0x58,0xa0,0xf8]
313 prfm
#26, [x0, w0, uxtw #3]
314 // CHECK-INST
: rprfm
#10, x0, [x0]
315 // CHECK-ENCODING
: [0x1a,0x58,0xa0,0xf8]
317 prfm
#27, [x0, w0, uxtw #3]
318 // CHECK-INST
: rprfm
#11, x0, [x0]
319 // CHECK-ENCODING
: [0x1b,0x58,0xa0,0xf8]
321 prfm
#28, [x0, w0, uxtw #3]
322 // CHECK-INST
: rprfm
#12, x0, [x0]
323 // CHECK-ENCODING
: [0x1c,0x58,0xa0,0xf8]
325 prfm
#29, [x0, w0, uxtw #3]
326 // CHECK-INST
: rprfm
#13, x0, [x0]
327 // CHECK-ENCODING
: [0x1d,0x58,0xa0,0xf8]
329 prfm
#30, [x0, w0, uxtw #3]
330 // CHECK-INST
: rprfm
#14, x0, [x0]
331 // CHECK-ENCODING
: [0x1e,0x58,0xa0,0xf8]
333 prfm
#31, [x0, w0, uxtw #3]
334 // CHECK-INST
: rprfm
#15, x0, [x0]
335 // CHECK-ENCODING
: [0x1f,0x58,0xa0,0xf8]
338 // CHECK-INST
: rprfm
#16, x0, [x0]
339 // CHECK-ENCODING
: [0x18,0x68,0xa0,0xf8]
342 // CHECK-INST
: rprfm
#17, x0, [x0]
343 // CHECK-ENCODING
: [0x19,0x68,0xa0,0xf8]
346 // CHECK-INST
: rprfm
#18, x0, [x0]
347 // CHECK-ENCODING
: [0x1a,0x68,0xa0,0xf8]
350 // CHECK-INST
: rprfm
#19, x0, [x0]
351 // CHECK-ENCODING
: [0x1b,0x68,0xa0,0xf8]
354 // CHECK-INST
: rprfm
#20, x0, [x0]
355 // CHECK-ENCODING
: [0x1c,0x68,0xa0,0xf8]
358 // CHECK-INST
: rprfm
#21, x0, [x0]
359 // CHECK-ENCODING
: [0x1d,0x68,0xa0,0xf8]
362 // CHECK-INST
: rprfm
#22, x0, [x0]
363 // CHECK-ENCODING
: [0x1e,0x68,0xa0,0xf8]
366 // CHECK-INST
: rprfm
#23, x0, [x0]
367 // CHECK-ENCODING
: [0x1f,0x68,0xa0,0xf8]
369 prfm
#24, [x0, x0, lsl #3]
370 // CHECK-INST
: rprfm
#24, x0, [x0]
371 // CHECK-ENCODING
: [0x18,0x78,0xa0,0xf8]
373 prfm
#25, [x0, x0, lsl #3]
374 // CHECK-INST
: rprfm
#25, x0, [x0]
375 // CHECK-ENCODING
: [0x19,0x78,0xa0,0xf8]
377 prfm
#26, [x0, x0, lsl #3]
378 // CHECK-INST
: rprfm
#26, x0, [x0]
379 // CHECK-ENCODING
: [0x1a,0x78,0xa0,0xf8]
381 prfm
#27, [x0, x0, lsl #3]
382 // CHECK-INST
: rprfm
#27, x0, [x0]
383 // CHECK-ENCODING
: [0x1b,0x78,0xa0,0xf8]
385 prfm
#28, [x0, x0, lsl #3]
386 // CHECK-INST
: rprfm
#28, x0, [x0]
387 // CHECK-ENCODING
: [0x1c,0x78,0xa0,0xf8]
389 prfm
#29, [x0, x0, lsl #3]
390 // CHECK-INST
: rprfm
#29, x0, [x0]
391 // CHECK-ENCODING
: [0x1d,0x78,0xa0,0xf8]
393 prfm
#30, [x0, x0, lsl #3]
394 // CHECK-INST
: rprfm
#30, x0, [x0]
395 // CHECK-ENCODING
: [0x1e,0x78,0xa0,0xf8]
397 prfm
#31, [x0, x0, lsl #3]
398 // CHECK-INST
: rprfm
#31, x0, [x0]
399 // CHECK-ENCODING
: [0x1f,0x78,0xa0,0xf8]
401 prfm
#24, [x0, w0, sxtw]
402 // CHECK-INST
: rprfm
#32, x0, [x0]
403 // CHECK-ENCODING
: [0x18,0xc8,0xa0,0xf8]
405 prfm
#25, [x0, w0, sxtw]
406 // CHECK-INST
: rprfm
#33, x0, [x0]
407 // CHECK-ENCODING
: [0x19,0xc8,0xa0,0xf8]
409 prfm
#26, [x0, w0, sxtw]
410 // CHECK-INST
: rprfm
#34, x0, [x0]
411 // CHECK-ENCODING
: [0x1a,0xc8,0xa0,0xf8]
413 prfm
#27, [x0, w0, sxtw]
414 // CHECK-INST
: rprfm
#35, x0, [x0]
415 // CHECK-ENCODING
: [0x1b,0xc8,0xa0,0xf8]
417 prfm
#28, [x0, w0, sxtw]
418 // CHECK-INST
: rprfm
#36, x0, [x0]
419 // CHECK-ENCODING
: [0x1c,0xc8,0xa0,0xf8]
421 prfm
#29, [x0, w0, sxtw]
422 // CHECK-INST
: rprfm
#37, x0, [x0]
423 // CHECK-ENCODING
: [0x1d,0xc8,0xa0,0xf8]
425 prfm
#30, [x0, w0, sxtw]
426 // CHECK-INST
: rprfm
#38, x0, [x0]
427 // CHECK-ENCODING
: [0x1e,0xc8,0xa0,0xf8]
429 prfm
#31, [x0, w0, sxtw]
430 // CHECK-INST
: rprfm
#39, x0, [x0]
431 // CHECK-ENCODING
: [0x1f,0xc8,0xa0,0xf8]
433 prfm
#24, [x0, w0, sxtw #3]
434 // CHECK-INST
: rprfm
#40, x0, [x0]
435 // CHECK-ENCODING
: [0x18,0xd8,0xa0,0xf8]
437 prfm
#25, [x0, w0, sxtw #3]
438 // CHECK-INST
: rprfm
#41, x0, [x0]
439 // CHECK-ENCODING
: [0x19,0xd8,0xa0,0xf8]
441 prfm
#26, [x0, w0, sxtw #3]
442 // CHECK-INST
: rprfm
#42, x0, [x0]
443 // CHECK-ENCODING
: [0x1a,0xd8,0xa0,0xf8]
445 prfm
#27, [x0, w0, sxtw #3]
446 // CHECK-INST
: rprfm
#43, x0, [x0]
447 // CHECK-ENCODING
: [0x1b,0xd8,0xa0,0xf8]
449 prfm
#28, [x0, w0, sxtw #3]
450 // CHECK-INST
: rprfm
#44, x0, [x0]
451 // CHECK-ENCODING
: [0x1c,0xd8,0xa0,0xf8]
453 prfm
#29, [x0, w0, sxtw #3]
454 // CHECK-INST
: rprfm
#45, x0, [x0]
455 // CHECK-ENCODING
: [0x1d,0xd8,0xa0,0xf8]
457 prfm
#30, [x0, w0, sxtw #3]
458 // CHECK-INST
: rprfm
#46, x0, [x0]
459 // CHECK-ENCODING
: [0x1e,0xd8,0xa0,0xf8]
461 prfm
#31, [x0, w0, sxtw #3]
462 // CHECK-INST
: rprfm
#47, x0, [x0]
463 // CHECK-ENCODING
: [0x1f,0xd8,0xa0,0xf8]
465 prfm
#24, [x0, x0, sxtx]
466 // CHECK-INST
: rprfm
#48, x0, [x0]
467 // CHECK-ENCODING
: [0x18,0xe8,0xa0,0xf8]
469 prfm
#25, [x0, x0, sxtx]
470 // CHECK-INST
: rprfm
#49, x0, [x0]
471 // CHECK-ENCODING
: [0x19,0xe8,0xa0,0xf8]
473 prfm
#26, [x0, x0, sxtx]
474 // CHECK-INST
: rprfm
#50, x0, [x0]
475 // CHECK-ENCODING
: [0x1a,0xe8,0xa0,0xf8]
477 prfm
#27, [x0, x0, sxtx]
478 // CHECK-INST
: rprfm
#51, x0, [x0]
479 // CHECK-ENCODING
: [0x1b,0xe8,0xa0,0xf8]
481 prfm
#28, [x0, x0, sxtx]
482 // CHECK-INST
: rprfm
#52, x0, [x0]
483 // CHECK-ENCODING
: [0x1c,0xe8,0xa0,0xf8]
485 prfm
#29, [x0, x0, sxtx]
486 // CHECK-INST
: rprfm
#53, x0, [x0]
487 // CHECK-ENCODING
: [0x1d,0xe8,0xa0,0xf8]
489 prfm
#30, [x0, x0, sxtx]
490 // CHECK-INST
: rprfm
#54, x0, [x0]
491 // CHECK-ENCODING
: [0x1e,0xe8,0xa0,0xf8]
493 prfm
#31, [x0, x0, sxtx]
494 // CHECK-INST
: rprfm
#55, x0, [x0]
495 // CHECK-ENCODING
: [0x1f,0xe8,0xa0,0xf8]
497 prfm
#24, [x0, x0, sxtx #3]
498 // CHECK-INST
: rprfm
#56, x0, [x0]
499 // CHECK-ENCODING
: [0x18,0xf8,0xa0,0xf8]
501 prfm
#25, [x0, x0, sxtx #3]
502 // CHECK-INST
: rprfm
#57, x0, [x0]
503 // CHECK-ENCODING
: [0x19,0xf8,0xa0,0xf8]
505 prfm
#26, [x0, x0, sxtx #3]
506 // CHECK-INST
: rprfm
#58, x0, [x0]
507 // CHECK-ENCODING
: [0x1a,0xf8,0xa0,0xf8]
509 prfm
#27, [x0, x0, sxtx #3]
510 // CHECK-INST
: rprfm
#59, x0, [x0]
511 // CHECK-ENCODING
: [0x1b,0xf8,0xa0,0xf8]
513 prfm
#28, [x0, x0, sxtx #3]
514 // CHECK-INST
: rprfm
#60, x0, [x0]
515 // CHECK-ENCODING
: [0x1c,0xf8,0xa0,0xf8]
517 prfm
#29, [x0, x0, sxtx #3]
518 // CHECK-INST
: rprfm
#61, x0, [x0]
519 // CHECK-ENCODING
: [0x1d,0xf8,0xa0,0xf8]
521 prfm
#30, [x0, x0, sxtx #3]
522 // CHECK-INST
: rprfm
#62, x0, [x0]
523 // CHECK-ENCODING
: [0x1e,0xf8,0xa0,0xf8]
525 prfm
#31, [x0, x0, sxtx #3]
526 // CHECK-INST
: rprfm
#63, x0, [x0]
527 // CHECK-ENCODING
: [0x1f,0xf8,0xa0,0xf8]