1 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
< %s \
2 // RUN
: | FileCheck
%s
--check-prefixes
=CHECK-ENCODING
,CHECK-INST
3 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sme
< %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
=+sve
< %s \
8 // RUN
: | llvm-objdump
--no-print-imm-hex
-d
--mattr
=+sve
- | FileCheck
%s
--check-prefix
=CHECK-INST
9 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+sve
< %s \
10 // RUN
: | llvm-objdump
--no-print-imm-hex
-d
--mattr
=-sve
- | FileCheck
%s
--check-prefix
=CHECK-UNKNOWN
12 // ---------------------------------------------------------------------------//
13 // Test all predicate sizes for pow2 pattern
14 // ---------------------------------------------------------------------------//
17 // CHECK-INST
: ptrue p0.
b, pow2
18 // CHECK-ENCODING
: [0x00,0xe0,0x18,0x25]
19 // CHECK-ERROR
: instruction requires
: sve
or sme
20 // CHECK-UNKNOWN
: 2518e000
<unknown
>
23 // CHECK-INST
: ptrue p0.h
, pow2
24 // CHECK-ENCODING
: [0x00,0xe0,0x58,0x25]
25 // CHECK-ERROR
: instruction requires
: sve
or sme
26 // CHECK-UNKNOWN
: 2558e000
<unknown
>
29 // CHECK-INST
: ptrue p0.s
, pow2
30 // CHECK-ENCODING
: [0x00,0xe0,0x98,0x25]
31 // CHECK-ERROR
: instruction requires
: sve
or sme
32 // CHECK-UNKNOWN
: 2598e000
<unknown
>
35 // CHECK-INST
: ptrue p0.d
, pow2
36 // CHECK-ENCODING
: [0x00,0xe0,0xd8,0x25]
37 // CHECK-ERROR
: instruction requires
: sve
or sme
38 // CHECK-UNKNOWN
: 25d8e000
<unknown
>
40 // ---------------------------------------------------------------------------//
41 // Test all predicate sizes without explicit pattern
42 // ---------------------------------------------------------------------------//
45 // CHECK-INST
: ptrue p15.
b
46 // CHECK-ENCODING
: [0xef,0xe3,0x18,0x25]
47 // CHECK-ERROR
: instruction requires
: sve
or sme
48 // CHECK-UNKNOWN
: 2518e3ef
<unknown
>
51 // CHECK-INST
: ptrue p15.h
52 // CHECK-ENCODING
: [0xef,0xe3,0x58,0x25]
53 // CHECK-ERROR
: instruction requires
: sve
or sme
54 // CHECK-UNKNOWN
: 2558e3ef
<unknown
>
57 // CHECK-INST
: ptrue p15.s
58 // CHECK-ENCODING
: [0xef,0xe3,0x98,0x25]
59 // CHECK-ERROR
: instruction requires
: sve
or sme
60 // CHECK-UNKNOWN
: 2598e3ef
<unknown
>
63 // CHECK-INST
: ptrue p15.d
64 // CHECK-ENCODING
: [0xef,0xe3,0xd8,0x25]
65 // CHECK-ERROR
: instruction requires
: sve
or sme
66 // CHECK-UNKNOWN
: 25d8e3ef
<unknown
>
68 // ---------------------------------------------------------------------------//
69 // Test available patterns
70 // ---------------------------------------------------------------------------//
73 // CHECK-INST
: ptrue p7.s
, vl1
74 // CHECK-ENCODING
: [0x27,0xe0,0x98,0x25]
75 // CHECK-ERROR
: instruction requires
: sve
or sme
76 // CHECK-UNKNOWN
: 2598e027
<unknown
>
79 // CHECK-INST
: ptrue p7.s
, vl1
80 // CHECK-ENCODING
: [0x27,0xe0,0x98,0x25]
81 // CHECK-ERROR
: instruction requires
: sve
or sme
82 // CHECK-UNKNOWN
: 2598e027
<unknown
>
85 // CHECK-INST
: ptrue p7.s
, vl2
86 // CHECK-ENCODING
: [0x47,0xe0,0x98,0x25]
87 // CHECK-ERROR
: instruction requires
: sve
or sme
88 // CHECK-UNKNOWN
: 2598e047
<unknown
>
91 // CHECK-INST
: ptrue p7.s
, vl3
92 // CHECK-ENCODING
: [0x67,0xe0,0x98,0x25]
93 // CHECK-ERROR
: instruction requires
: sve
or sme
94 // CHECK-UNKNOWN
: 2598e067
<unknown
>
97 // CHECK-INST
: ptrue p7.s
, vl4
98 // CHECK-ENCODING
: [0x87,0xe0,0x98,0x25]
99 // CHECK-ERROR
: instruction requires
: sve
or sme
100 // CHECK-UNKNOWN
: 2598e087
<unknown
>
103 // CHECK-INST
: ptrue p7.s
, vl5
104 // CHECK-ENCODING
: [0xa7,0xe0,0x98,0x25]
105 // CHECK-ERROR
: instruction requires
: sve
or sme
106 // CHECK-UNKNOWN
: 2598e0a7
<unknown
>
109 // CHECK-INST
: ptrue p7.s
, vl6
110 // CHECK-ENCODING
: [0xc7,0xe0,0x98,0x25]
111 // CHECK-ERROR
: instruction requires
: sve
or sme
112 // CHECK-UNKNOWN
: 2598e0c7
<unknown
>
115 // CHECK-INST
: ptrue p7.s
, vl7
116 // CHECK-ENCODING
: [0xe7,0xe0,0x98,0x25]
117 // CHECK-ERROR
: instruction requires
: sve
or sme
118 // CHECK-UNKNOWN
: 2598e0e7
<unknown
>
121 // CHECK-INST
: ptrue p7.s
, vl8
122 // CHECK-ENCODING
: [0x07,0xe1,0x98,0x25]
123 // CHECK-ERROR
: instruction requires
: sve
or sme
124 // CHECK-UNKNOWN
: 2598e107
<unknown
>
127 // CHECK-INST
: ptrue p7.s
, vl16
128 // CHECK-ENCODING
: [0x27,0xe1,0x98,0x25]
129 // CHECK-ERROR
: instruction requires
: sve
or sme
130 // CHECK-UNKNOWN
: 2598e127
<unknown
>
133 // CHECK-INST
: ptrue p7.s
, vl32
134 // CHECK-ENCODING
: [0x47,0xe1,0x98,0x25]
135 // CHECK-ERROR
: instruction requires
: sve
or sme
136 // CHECK-UNKNOWN
: 2598e147
<unknown
>
139 // CHECK-INST
: ptrue p7.s
, vl64
140 // CHECK-ENCODING
: [0x67,0xe1,0x98,0x25]
141 // CHECK-ERROR
: instruction requires
: sve
or sme
142 // CHECK-UNKNOWN
: 2598e167
<unknown
>
145 // CHECK-INST
: ptrue p7.s
, vl128
146 // CHECK-ENCODING
: [0x87,0xe1,0x98,0x25]
147 // CHECK-ERROR
: instruction requires
: sve
or sme
148 // CHECK-UNKNOWN
: 2598e187
<unknown
>
151 // CHECK-INST
: ptrue p7.s
, vl256
152 // CHECK-ENCODING
: [0xa7,0xe1,0x98,0x25]
153 // CHECK-ERROR
: instruction requires
: sve
or sme
154 // CHECK-UNKNOWN
: 2598e1a7
<unknown
>
157 // CHECK-INST
: ptrue p7.s
, mul4
158 // CHECK-ENCODING
: [0xa7,0xe3,0x98,0x25]
159 // CHECK-ERROR
: instruction requires
: sve
or sme
160 // CHECK-UNKNOWN
: 2598e3a7
<unknown
>
163 // CHECK-INST
: ptrue p7.s
, mul3
164 // CHECK-ENCODING
: [0xc7,0xe3,0x98,0x25]
165 // CHECK-ERROR
: instruction requires
: sve
or sme
166 // CHECK-UNKNOWN
: 2598e3c7
<unknown
>
169 // CHECK-INST
: ptrue p7.s
170 // CHECK-ENCODING
: [0xe7,0xe3,0x98,0x25]
171 // CHECK-ERROR
: instruction requires
: sve
or sme
172 // CHECK-UNKNOWN
: 2598e3e7
<unknown
>
174 // ---------------------------------------------------------------------------//
175 // Test immediate values
not corresponding to
a named pattern
176 // ---------------------------------------------------------------------------//
179 // CHECK-INST
: ptrue p7.s
, #14
180 // CHECK-ENCODING
: [0xc7,0xe1,0x98,0x25]
181 // CHECK-ERROR
: instruction requires
: sve
or sme
182 // CHECK-UNKNOWN
: 2598e1c7
<unknown
>
185 // CHECK-INST
: ptrue p7.s
, #15
186 // CHECK-ENCODING
: [0xe7,0xe1,0x98,0x25]
187 // CHECK-ERROR
: instruction requires
: sve
or sme
188 // CHECK-UNKNOWN
: 2598e1e7
<unknown
>
191 // CHECK-INST
: ptrue p7.s
, #16
192 // CHECK-ENCODING
: [0x07,0xe2,0x98,0x25]
193 // CHECK-ERROR
: instruction requires
: sve
or sme
194 // CHECK-UNKNOWN
: 2598e207
<unknown
>
197 // CHECK-INST
: ptrue p7.s
, #17
198 // CHECK-ENCODING
: [0x27,0xe2,0x98,0x25]
199 // CHECK-ERROR
: instruction requires
: sve
or sme
200 // CHECK-UNKNOWN
: 2598e227
<unknown
>
203 // CHECK-INST
: ptrue p7.s
, #18
204 // CHECK-ENCODING
: [0x47,0xe2,0x98,0x25]
205 // CHECK-ERROR
: instruction requires
: sve
or sme
206 // CHECK-UNKNOWN
: 2598e247
<unknown
>
209 // CHECK-INST
: ptrue p7.s
, #19
210 // CHECK-ENCODING
: [0x67,0xe2,0x98,0x25]
211 // CHECK-ERROR
: instruction requires
: sve
or sme
212 // CHECK-UNKNOWN
: 2598e267
<unknown
>
215 // CHECK-INST
: ptrue p7.s
, #20
216 // CHECK-ENCODING
: [0x87,0xe2,0x98,0x25]
217 // CHECK-ERROR
: instruction requires
: sve
or sme
218 // CHECK-UNKNOWN
: 2598e287
<unknown
>
221 // CHECK-INST
: ptrue p7.s
, #21
222 // CHECK-ENCODING
: [0xa7,0xe2,0x98,0x25]
223 // CHECK-ERROR
: instruction requires
: sve
or sme
224 // CHECK-UNKNOWN
: 2598e2a7
<unknown
>
227 // CHECK-INST
: ptrue p7.s
, #22
228 // CHECK-ENCODING
: [0xc7,0xe2,0x98,0x25]
229 // CHECK-ERROR
: instruction requires
: sve
or sme
230 // CHECK-UNKNOWN
: 2598e2c7
<unknown
>
233 // CHECK-INST
: ptrue p7.s
, #23
234 // CHECK-ENCODING
: [0xe7,0xe2,0x98,0x25]
235 // CHECK-ERROR
: instruction requires
: sve
or sme
236 // CHECK-UNKNOWN
: 2598e2e7
<unknown
>
239 // CHECK-INST
: ptrue p7.s
, #24
240 // CHECK-ENCODING
: [0x07,0xe3,0x98,0x25]
241 // CHECK-ERROR
: instruction requires
: sve
or sme
242 // CHECK-UNKNOWN
: 2598e307
<unknown
>
245 // CHECK-INST
: ptrue p7.s
, #25
246 // CHECK-ENCODING
: [0x27,0xe3,0x98,0x25]
247 // CHECK-ERROR
: instruction requires
: sve
or sme
248 // CHECK-UNKNOWN
: 2598e327
<unknown
>
251 // CHECK-INST
: ptrue p7.s
, #26
252 // CHECK-ENCODING
: [0x47,0xe3,0x98,0x25]
253 // CHECK-ERROR
: instruction requires
: sve
or sme
254 // CHECK-UNKNOWN
: 2598e347
<unknown
>
257 // CHECK-INST
: ptrue p7.s
, #27
258 // CHECK-ENCODING
: [0x67,0xe3,0x98,0x25]
259 // CHECK-ERROR
: instruction requires
: sve
or sme
260 // CHECK-UNKNOWN
: 2598e367
<unknown
>
263 // CHECK-INST
: ptrue p7.s
, #28
264 // CHECK-ENCODING
: [0x87,0xe3,0x98,0x25]
265 // CHECK-ERROR
: instruction requires
: sve
or sme
266 // CHECK-UNKNOWN
: 2598e387
<unknown
>