1+ // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \
2+ // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3+ // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p2 < %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=+sve2p2 < %s \
8+ // RUN: | llvm-objdump -d --mattr=+sve2p2 - | FileCheck %s --check-prefix=CHECK-INST
9+ // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2p2 < %s \
10+ // RUN: | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
11+ // Disassemble encoding and check the re-encoding (-show-encoding) matches.
12+ // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \
13+ // RUN: | sed '/.text /d' | sed 's/.*encoding: //g' \
14+ // RUN: | llvm-mc -triple=aarch64 -mattr=+sve2p2 -disassemble -show-encoding \
15+ // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
16+
17+ movprfx z23.d, p3/m, z31.d
18+ frint64x z23.d, p3/m, z13.d // 01100101-00010111-10101101-10110111
19+ // CHECK-INST: movprfx z23.d, p3/m, z31.d
20+ // CHECK-INST: frint64x z23.d, p3/m, z13.d
21+ // CHECK-ENCODING: [0xb7,0xad,0x17,0x65]
22+ // CHECK-ERROR: instruction requires: sme2p2 or sve2p2
23+ // CHECK-UNKNOWN: 6517adb7 <unknown>
24+
25+ movprfx z23, z31
26+ frint64x z23.s, p3/m, z13.s // 01100101-00010101-10101101-10110111
27+ // CHECK-INST: movprfx z23, z31
28+ // CHECK-INST: frint64x z23.s, p3/m, z13.s
29+ // CHECK-ENCODING: [0xb7,0xad,0x15,0x65]
30+ // CHECK-ERROR: instruction requires: sme2p2 or sve2p2
31+ // CHECK-UNKNOWN: 6515adb7 <unknown>
32+
33+ frint64x z21.d, p5/m, z10.d // 01100101-00010111-10110101-01010101
34+ // CHECK-INST: frint64x z21.d, p5/m, z10.d
35+ // CHECK-ENCODING: [0x55,0xb5,0x17,0x65]
36+ // CHECK-ERROR: instruction requires: sme2p2 or sve2p2
37+ // CHECK-UNKNOWN: 6517b555 <unknown>
38+
39+ frint64x z31.d, p7/m, z31.d // 01100101-00010111-10111111-11111111
40+ // CHECK-INST: frint64x z31.d, p7/m, z31.d
41+ // CHECK-ENCODING: [0xff,0xbf,0x17,0x65]
42+ // CHECK-ERROR: instruction requires: sme2p2 or sve2p2
43+ // CHECK-UNKNOWN: 6517bfff <unknown>
44+
45+ frint64x z31.s, p7/m, z31.s // 01100101-00010101-10111111-11111111
46+ // CHECK-INST: frint64x z31.s, p7/m, z31.s
47+ // CHECK-ENCODING: [0xff,0xbf,0x15,0x65]
48+ // CHECK-ERROR: instruction requires: sme2p2 or sve2p2
49+ // CHECK-UNKNOWN: 6515bfff <unknown>
0 commit comments