1 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sme
< %s \
2 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
3 // RUN
: not llvm-mc
-triple
=aarch64
-show-encoding
< %s
2>&1 \
4 // RUN
: | FileCheck
%s
--check-prefix
=CHECK-ERROR
5 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+sme
< %s \
6 // RUN
: | llvm-objdump
-d
--mattr
=+sme
- | FileCheck
%s
--check-prefix
=CHECK-INST
7 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+sme
< %s \
8 // RUN
: | llvm-objdump
-d
--mattr
=-sme
- | FileCheck
%s
--check-prefix
=CHECK-UNKNOWN
9 // Disassemble encoding
and check the re-encoding
(-show-encoding
) matches.
10 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sme
< %s \
11 // RUN
: | sed
'/.text/d' | sed
's/.*encoding: //g' \
12 // RUN
: | llvm-mc
-triple
=aarch64
-mattr
=+sme
-disassemble
-show-encoding \
13 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
15 // --------------------------------------------------------------------------//
18 ld1b
{za0h.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
19 // CHECK-INST
: ld1b
{za0h.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
20 // CHECK-ENCODING
: [0x00,0x00,0x00,0xe0]
21 // CHECK-ERROR
: instruction requires
: sme
22 // CHECK-UNKNOWN
: e0000000
<unknown
>
24 ld1b
{za0h.
b[w14
, 5]}, p5
/z
, [x10
, x21
]
25 // CHECK-INST
: ld1b
{za0h.
b[w14
, 5]}, p5
/z
, [x10
, x21
]
26 // CHECK-ENCODING
: [0x45,0x55,0x15,0xe0]
27 // CHECK-ERROR
: instruction requires
: sme
28 // CHECK-UNKNOWN
: e0155545
<unknown
>
30 ld1b
{za0h.
b[w15
, 7]}, p3
/z
, [x13
, x8
]
31 // CHECK-INST
: ld1b
{za0h.
b[w15
, 7]}, p3
/z
, [x13
, x8
]
32 // CHECK-ENCODING
: [0xa7,0x6d,0x08,0xe0]
33 // CHECK-ERROR
: instruction requires
: sme
34 // CHECK-UNKNOWN
: e0086da7
<unknown
>
36 ld1b
{za0h.
b[w15
, 15]}, p7
/z
, [sp
]
37 // CHECK-INST
: ld1b
{za0h.
b[w15
, 15]}, p7
/z
, [sp
]
38 // CHECK-ENCODING
: [0xef,0x7f,0x1f,0xe0]
39 // CHECK-ERROR
: instruction requires
: sme
40 // CHECK-UNKNOWN
: e01f7fef
<unknown
>
42 ld1b
{za0h.
b[w12
, 5]}, p3
/z
, [x17
, x16
]
43 // CHECK-INST
: ld1b
{za0h.
b[w12
, 5]}, p3
/z
, [x17
, x16
]
44 // CHECK-ENCODING
: [0x25,0x0e,0x10,0xe0]
45 // CHECK-ERROR
: instruction requires
: sme
46 // CHECK-UNKNOWN
: e0100e25
<unknown
>
48 ld1b
{za0h.
b[w12
, 1]}, p1
/z
, [x1
, x30
]
49 // CHECK-INST
: ld1b
{za0h.
b[w12
, 1]}, p1
/z
, [x1
, x30
]
50 // CHECK-ENCODING
: [0x21,0x04,0x1e,0xe0]
51 // CHECK-ERROR
: instruction requires
: sme
52 // CHECK-UNKNOWN
: e01e0421
<unknown
>
54 ld1b
{za0h.
b[w14
, 8]}, p5
/z
, [x19
, x20
]
55 // CHECK-INST
: ld1b
{za0h.
b[w14
, 8]}, p5
/z
, [x19
, x20
]
56 // CHECK-ENCODING
: [0x68,0x56,0x14,0xe0]
57 // CHECK-ERROR
: instruction requires
: sme
58 // CHECK-UNKNOWN
: e0145668
<unknown
>
60 ld1b
{za0h.
b[w12
, 0]}, p6
/z
, [x12
, x2
]
61 // CHECK-INST
: ld1b
{za0h.
b[w12
, 0]}, p6
/z
, [x12
, x2
]
62 // CHECK-ENCODING
: [0x80,0x19,0x02,0xe0]
63 // CHECK-ERROR
: instruction requires
: sme
64 // CHECK-UNKNOWN
: e0021980
<unknown
>
66 ld1b
{za0h.
b[w14
, 1]}, p2
/z
, [x1
, x26
]
67 // CHECK-INST
: ld1b
{za0h.
b[w14
, 1]}, p2
/z
, [x1
, x26
]
68 // CHECK-ENCODING
: [0x21,0x48,0x1a,0xe0]
69 // CHECK-ERROR
: instruction requires
: sme
70 // CHECK-UNKNOWN
: e01a4821
<unknown
>
72 ld1b
{za0h.
b[w12
, 13]}, p2
/z
, [x22
, x30
]
73 // CHECK-INST
: ld1b
{za0h.
b[w12
, 13]}, p2
/z
, [x22
, x30
]
74 // CHECK-ENCODING
: [0xcd,0x0a,0x1e,0xe0]
75 // CHECK-ERROR
: instruction requires
: sme
76 // CHECK-UNKNOWN
: e01e0acd
<unknown
>
78 ld1b
{za0h.
b[w15
, 2]}, p5
/z
, [x9
, x1
]
79 // CHECK-INST
: ld1b
{za0h.
b[w15
, 2]}, p5
/z
, [x9
, x1
]
80 // CHECK-ENCODING
: [0x22,0x75,0x01,0xe0]
81 // CHECK-ERROR
: instruction requires
: sme
82 // CHECK-UNKNOWN
: e0017522
<unknown
>
84 ld1b
{za0h.
b[w13
, 7]}, p2
/z
, [x12
, x11
]
85 // CHECK-INST
: ld1b
{za0h.
b[w13
, 7]}, p2
/z
, [x12
, x11
]
86 // CHECK-ENCODING
: [0x87,0x29,0x0b,0xe0]
87 // CHECK-ERROR
: instruction requires
: sme
88 // CHECK-UNKNOWN
: e00b2987
<unknown
>
90 ld1b za0h.
b[w12
, 0], p0
/z
, [x0
, x0
]
91 // CHECK-INST
: ld1b
{za0h.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
92 // CHECK-ENCODING
: [0x00,0x00,0x00,0xe0]
93 // CHECK-ERROR
: instruction requires
: sme
94 // CHECK-UNKNOWN
: e0000000
<unknown
>
96 ld1b za0h.
b[w14
, 5], p5
/z
, [x10
, x21
]
97 // CHECK-INST
: ld1b
{za0h.
b[w14
, 5]}, p5
/z
, [x10
, x21
]
98 // CHECK-ENCODING
: [0x45,0x55,0x15,0xe0]
99 // CHECK-ERROR
: instruction requires
: sme
100 // CHECK-UNKNOWN
: e0155545
<unknown
>
102 ld1b za0h.
b[w15
, 7], p3
/z
, [x13
, x8
]
103 // CHECK-INST
: ld1b
{za0h.
b[w15
, 7]}, p3
/z
, [x13
, x8
]
104 // CHECK-ENCODING
: [0xa7,0x6d,0x08,0xe0]
105 // CHECK-ERROR
: instruction requires
: sme
106 // CHECK-UNKNOWN
: e0086da7
<unknown
>
108 ld1b za0h.
b[w15
, 15], p7
/z
, [sp
]
109 // CHECK-INST
: ld1b
{za0h.
b[w15
, 15]}, p7
/z
, [sp
]
110 // CHECK-ENCODING
: [0xef,0x7f,0x1f,0xe0]
111 // CHECK-ERROR
: instruction requires
: sme
112 // CHECK-UNKNOWN
: e01f7fef
<unknown
>
114 ld1b za0h.
b[w12
, 5], p3
/z
, [x17
, x16
]
115 // CHECK-INST
: ld1b
{za0h.
b[w12
, 5]}, p3
/z
, [x17
, x16
]
116 // CHECK-ENCODING
: [0x25,0x0e,0x10,0xe0]
117 // CHECK-ERROR
: instruction requires
: sme
118 // CHECK-UNKNOWN
: e0100e25
<unknown
>
120 ld1b za0h.
b[w12
, 1], p1
/z
, [x1
, x30
]
121 // CHECK-INST
: ld1b
{za0h.
b[w12
, 1]}, p1
/z
, [x1
, x30
]
122 // CHECK-ENCODING
: [0x21,0x04,0x1e,0xe0]
123 // CHECK-ERROR
: instruction requires
: sme
124 // CHECK-UNKNOWN
: e01e0421
<unknown
>
126 ld1b za0h.
b[w14
, 8], p5
/z
, [x19
, x20
]
127 // CHECK-INST
: ld1b
{za0h.
b[w14
, 8]}, p5
/z
, [x19
, x20
]
128 // CHECK-ENCODING
: [0x68,0x56,0x14,0xe0]
129 // CHECK-ERROR
: instruction requires
: sme
130 // CHECK-UNKNOWN
: e0145668
<unknown
>
132 ld1b za0h.
b[w12
, 0], p6
/z
, [x12
, x2
]
133 // CHECK-INST
: ld1b
{za0h.
b[w12
, 0]}, p6
/z
, [x12
, x2
]
134 // CHECK-ENCODING
: [0x80,0x19,0x02,0xe0]
135 // CHECK-ERROR
: instruction requires
: sme
136 // CHECK-UNKNOWN
: e0021980
<unknown
>
138 ld1b za0h.
b[w14
, 1], p2
/z
, [x1
, x26
]
139 // CHECK-INST
: ld1b
{za0h.
b[w14
, 1]}, p2
/z
, [x1
, x26
]
140 // CHECK-ENCODING
: [0x21,0x48,0x1a,0xe0]
141 // CHECK-ERROR
: instruction requires
: sme
142 // CHECK-UNKNOWN
: e01a4821
<unknown
>
144 ld1b za0h.
b[w12
, 13], p2
/z
, [x22
, x30
]
145 // CHECK-INST
: ld1b
{za0h.
b[w12
, 13]}, p2
/z
, [x22
, x30
]
146 // CHECK-ENCODING
: [0xcd,0x0a,0x1e,0xe0]
147 // CHECK-ERROR
: instruction requires
: sme
148 // CHECK-UNKNOWN
: e01e0acd
<unknown
>
150 ld1b za0h.
b[w15
, 2], p5
/z
, [x9
, x1
]
151 // CHECK-INST
: ld1b
{za0h.
b[w15
, 2]}, p5
/z
, [x9
, x1
]
152 // CHECK-ENCODING
: [0x22,0x75,0x01,0xe0]
153 // CHECK-ERROR
: instruction requires
: sme
154 // CHECK-UNKNOWN
: e0017522
<unknown
>
156 ld1b za0h.
b[w13
, 7], p2
/z
, [x12
, x11
]
157 // CHECK-INST
: ld1b
{za0h.
b[w13
, 7]}, p2
/z
, [x12
, x11
]
158 // CHECK-ENCODING
: [0x87,0x29,0x0b,0xe0]
159 // CHECK-ERROR
: instruction requires
: sme
160 // CHECK-UNKNOWN
: e00b2987
<unknown
>
162 // --------------------------------------------------------------------------//
165 ld1b
{za0v.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
166 // CHECK-INST
: ld1b
{za0v.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
167 // CHECK-ENCODING
: [0x00,0x80,0x00,0xe0]
168 // CHECK-ERROR
: instruction requires
: sme
169 // CHECK-UNKNOWN
: e0008000
<unknown
>
171 ld1b
{za0v.
b[w14
, 5]}, p5
/z
, [x10
, x21
]
172 // CHECK-INST
: ld1b
{za0v.
b[w14
, 5]}, p5
/z
, [x10
, x21
]
173 // CHECK-ENCODING
: [0x45,0xd5,0x15,0xe0]
174 // CHECK-ERROR
: instruction requires
: sme
175 // CHECK-UNKNOWN
: e015d545
<unknown
>
177 ld1b
{za0v.
b[w15
, 7]}, p3
/z
, [x13
, x8
]
178 // CHECK-INST
: ld1b
{za0v.
b[w15
, 7]}, p3
/z
, [x13
, x8
]
179 // CHECK-ENCODING
: [0xa7,0xed,0x08,0xe0]
180 // CHECK-ERROR
: instruction requires
: sme
181 // CHECK-UNKNOWN
: e008eda7
<unknown
>
183 ld1b
{za0v.
b[w15
, 15]}, p7
/z
, [sp
]
184 // CHECK-INST
: ld1b
{za0v.
b[w15
, 15]}, p7
/z
, [sp
]
185 // CHECK-ENCODING
: [0xef,0xff,0x1f,0xe0]
186 // CHECK-ERROR
: instruction requires
: sme
187 // CHECK-UNKNOWN
: e01fffef
<unknown
>
189 ld1b
{za0v.
b[w12
, 5]}, p3
/z
, [x17
, x16
]
190 // CHECK-INST
: ld1b
{za0v.
b[w12
, 5]}, p3
/z
, [x17
, x16
]
191 // CHECK-ENCODING
: [0x25,0x8e,0x10,0xe0]
192 // CHECK-ERROR
: instruction requires
: sme
193 // CHECK-UNKNOWN
: e0108e25
<unknown
>
195 ld1b
{za0v.
b[w12
, 1]}, p1
/z
, [x1
, x30
]
196 // CHECK-INST
: ld1b
{za0v.
b[w12
, 1]}, p1
/z
, [x1
, x30
]
197 // CHECK-ENCODING
: [0x21,0x84,0x1e,0xe0]
198 // CHECK-ERROR
: instruction requires
: sme
199 // CHECK-UNKNOWN
: e01e8421
<unknown
>
201 ld1b
{za0v.
b[w14
, 8]}, p5
/z
, [x19
, x20
]
202 // CHECK-INST
: ld1b
{za0v.
b[w14
, 8]}, p5
/z
, [x19
, x20
]
203 // CHECK-ENCODING
: [0x68,0xd6,0x14,0xe0]
204 // CHECK-ERROR
: instruction requires
: sme
205 // CHECK-UNKNOWN
: e014d668
<unknown
>
207 ld1b
{za0v.
b[w12
, 0]}, p6
/z
, [x12
, x2
]
208 // CHECK-INST
: ld1b
{za0v.
b[w12
, 0]}, p6
/z
, [x12
, x2
]
209 // CHECK-ENCODING
: [0x80,0x99,0x02,0xe0]
210 // CHECK-ERROR
: instruction requires
: sme
211 // CHECK-UNKNOWN
: e0029980
<unknown
>
213 ld1b
{za0v.
b[w14
, 1]}, p2
/z
, [x1
, x26
]
214 // CHECK-INST
: ld1b
{za0v.
b[w14
, 1]}, p2
/z
, [x1
, x26
]
215 // CHECK-ENCODING
: [0x21,0xc8,0x1a,0xe0]
216 // CHECK-ERROR
: instruction requires
: sme
217 // CHECK-UNKNOWN
: e01ac821
<unknown
>
219 ld1b
{za0v.
b[w12
, 13]}, p2
/z
, [x22
, x30
]
220 // CHECK-INST
: ld1b
{za0v.
b[w12
, 13]}, p2
/z
, [x22
, x30
]
221 // CHECK-ENCODING
: [0xcd,0x8a,0x1e,0xe0]
222 // CHECK-ERROR
: instruction requires
: sme
223 // CHECK-UNKNOWN
: e01e8acd
<unknown
>
225 ld1b
{za0v.
b[w15
, 2]}, p5
/z
, [x9
, x1
]
226 // CHECK-INST
: ld1b
{za0v.
b[w15
, 2]}, p5
/z
, [x9
, x1
]
227 // CHECK-ENCODING
: [0x22,0xf5,0x01,0xe0]
228 // CHECK-ERROR
: instruction requires
: sme
229 // CHECK-UNKNOWN
: e001f522
<unknown
>
231 ld1b
{za0v.
b[w13
, 7]}, p2
/z
, [x12
, x11
]
232 // CHECK-INST
: ld1b
{za0v.
b[w13
, 7]}, p2
/z
, [x12
, x11
]
233 // CHECK-ENCODING
: [0x87,0xa9,0x0b,0xe0]
234 // CHECK-ERROR
: instruction requires
: sme
235 // CHECK-UNKNOWN
: e00ba987
<unknown
>
237 ld1b za0v.
b[w12
, 0], p0
/z
, [x0
, x0
]
238 // CHECK-INST
: ld1b
{za0v.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
239 // CHECK-ENCODING
: [0x00,0x80,0x00,0xe0]
240 // CHECK-ERROR
: instruction requires
: sme
241 // CHECK-UNKNOWN
: e0008000
<unknown
>
243 ld1b za0v.
b[w14
, 5], p5
/z
, [x10
, x21
]
244 // CHECK-INST
: ld1b
{za0v.
b[w14
, 5]}, p5
/z
, [x10
, x21
]
245 // CHECK-ENCODING
: [0x45,0xd5,0x15,0xe0]
246 // CHECK-ERROR
: instruction requires
: sme
247 // CHECK-UNKNOWN
: e015d545
<unknown
>
249 ld1b za0v.
b[w15
, 7], p3
/z
, [x13
, x8
]
250 // CHECK-INST
: ld1b
{za0v.
b[w15
, 7]}, p3
/z
, [x13
, x8
]
251 // CHECK-ENCODING
: [0xa7,0xed,0x08,0xe0]
252 // CHECK-ERROR
: instruction requires
: sme
253 // CHECK-UNKNOWN
: e008eda7
<unknown
>
255 ld1b za0v.
b[w15
, 15], p7
/z
, [sp
]
256 // CHECK-INST
: ld1b
{za0v.
b[w15
, 15]}, p7
/z
, [sp
]
257 // CHECK-ENCODING
: [0xef,0xff,0x1f,0xe0]
258 // CHECK-ERROR
: instruction requires
: sme
259 // CHECK-UNKNOWN
: e01fffef
<unknown
>
261 ld1b za0v.
b[w12
, 5], p3
/z
, [x17
, x16
]
262 // CHECK-INST
: ld1b
{za0v.
b[w12
, 5]}, p3
/z
, [x17
, x16
]
263 // CHECK-ENCODING
: [0x25,0x8e,0x10,0xe0]
264 // CHECK-ERROR
: instruction requires
: sme
265 // CHECK-UNKNOWN
: e0108e25
<unknown
>
267 ld1b za0v.
b[w12
, 1], p1
/z
, [x1
, x30
]
268 // CHECK-INST
: ld1b
{za0v.
b[w12
, 1]}, p1
/z
, [x1
, x30
]
269 // CHECK-ENCODING
: [0x21,0x84,0x1e,0xe0]
270 // CHECK-ERROR
: instruction requires
: sme
271 // CHECK-UNKNOWN
: e01e8421
<unknown
>
273 ld1b za0v.
b[w14
, 8], p5
/z
, [x19
, x20
]
274 // CHECK-INST
: ld1b
{za0v.
b[w14
, 8]}, p5
/z
, [x19
, x20
]
275 // CHECK-ENCODING
: [0x68,0xd6,0x14,0xe0]
276 // CHECK-ERROR
: instruction requires
: sme
277 // CHECK-UNKNOWN
: e014d668
<unknown
>
279 ld1b za0v.
b[w12
, 0], p6
/z
, [x12
, x2
]
280 // CHECK-INST
: ld1b
{za0v.
b[w12
, 0]}, p6
/z
, [x12
, x2
]
281 // CHECK-ENCODING
: [0x80,0x99,0x02,0xe0]
282 // CHECK-ERROR
: instruction requires
: sme
283 // CHECK-UNKNOWN
: e0029980
<unknown
>
285 ld1b za0v.
b[w14
, 1], p2
/z
, [x1
, x26
]
286 // CHECK-INST
: ld1b
{za0v.
b[w14
, 1]}, p2
/z
, [x1
, x26
]
287 // CHECK-ENCODING
: [0x21,0xc8,0x1a,0xe0]
288 // CHECK-ERROR
: instruction requires
: sme
289 // CHECK-UNKNOWN
: e01ac821
<unknown
>
291 ld1b za0v.
b[w12
, 13], p2
/z
, [x22
, x30
]
292 // CHECK-INST
: ld1b
{za0v.
b[w12
, 13]}, p2
/z
, [x22
, x30
]
293 // CHECK-ENCODING
: [0xcd,0x8a,0x1e,0xe0]
294 // CHECK-ERROR
: instruction requires
: sme
295 // CHECK-UNKNOWN
: e01e8acd
<unknown
>
297 ld1b za0v.
b[w15
, 2], p5
/z
, [x9
, x1
]
298 // CHECK-INST
: ld1b
{za0v.
b[w15
, 2]}, p5
/z
, [x9
, x1
]
299 // CHECK-ENCODING
: [0x22,0xf5,0x01,0xe0]
300 // CHECK-ERROR
: instruction requires
: sme
301 // CHECK-UNKNOWN
: e001f522
<unknown
>
303 ld1b za0v.
b[w13
, 7], p2
/z
, [x12
, x11
]
304 // CHECK-INST
: ld1b
{za0v.
b[w13
, 7]}, p2
/z
, [x12
, x11
]
305 // CHECK-ENCODING
: [0x87,0xa9,0x0b,0xe0]
306 // CHECK-ERROR
: instruction requires
: sme
307 // CHECK-UNKNOWN
: e00ba987
<unknown
>
309 // --------------------------------------------------------------------------//
310 // Test parsing in all-caps
312 LD1B
{ZA0H.
B[W12
, 0]}, P0
/Z
, [X0
, X0
]
313 // CHECK-INST
: ld1b
{za0h.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
314 // CHECK-ENCODING
: [0x00,0x00,0x00,0xe0]
315 // CHECK-ERROR
: instruction requires
: sme
316 // CHECK-UNKNOWN
: e0000000
<unknown
>
318 LD1B
{ZA0V.
B[W12
, 0]}, P0
/Z
, [X0
, X0
]
319 // CHECK-INST
: ld1b
{za0v.
b[w12
, 0]}, p0
/z
, [x0
, x0
]
320 // CHECK-ENCODING
: [0x00,0x80,0x00,0xe0]
321 // CHECK-ERROR
: instruction requires
: sme
322 // CHECK-UNKNOWN
: e0008000
<unknown
>