1 // RUN
: llvm-mc
-triple
=aarch64
-show-encoding
-mattr
=+sve
< %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
=+sve
< %s \
6 // RUN
: | llvm-objdump
-d
-mattr
=+sve
- | FileCheck
%s
--check-prefix
=CHECK-INST
7 // RUN
: llvm-mc
-triple
=aarch64
-filetype
=obj
-mattr
=+sve
< %s \
8 // RUN
: | llvm-objdump
-d
- | FileCheck
%s
--check-prefix
=CHECK-UNKNOWN
10 // ---------------------------------------------------------------------------//
11 // Test all predicate sizes for pow2 pattern
12 // ---------------------------------------------------------------------------//
15 // CHECK-INST
: ptrue p0.
b, pow2
16 // CHECK-ENCODING
: [0x00,0xe0,0x18,0x25]
17 // CHECK-ERROR
: instruction requires
: sve
18 // CHECK-UNKNOWN
: 00 e0
18 25 <unknown
>
21 // CHECK-INST
: ptrue p0.h
, pow2
22 // CHECK-ENCODING
: [0x00,0xe0,0x58,0x25]
23 // CHECK-ERROR
: instruction requires
: sve
24 // CHECK-UNKNOWN
: 00 e0
58 25 <unknown
>
27 // CHECK-INST
: ptrue p0.s
, pow2
28 // CHECK-ENCODING
: [0x00,0xe0,0x98,0x25]
29 // CHECK-ERROR
: instruction requires
: sve
30 // CHECK-UNKNOWN
: 00 e0
98 25 <unknown
>
33 // CHECK-INST
: ptrue p0.d
, pow2
34 // CHECK-ENCODING
: [0x00,0xe0,0xd8,0x25]
35 // CHECK-ERROR
: instruction requires
: sve
36 // CHECK-UNKNOWN
: 00 e0 d8
25 <unknown
>
38 // ---------------------------------------------------------------------------//
39 // Test all predicate sizes without explicit pattern
40 // ---------------------------------------------------------------------------//
43 // CHECK-INST
: ptrue p15.
b
44 // CHECK-ENCODING
: [0xef,0xe3,0x18,0x25]
45 // CHECK-ERROR
: instruction requires
: sve
46 // CHECK-UNKNOWN
: ef e3
18 25 <unknown
>
49 // CHECK-INST
: ptrue p15.h
50 // CHECK-ENCODING
: [0xef,0xe3,0x58,0x25]
51 // CHECK-ERROR
: instruction requires
: sve
52 // CHECK-UNKNOWN
: ef e3
58 25 <unknown
>
55 // CHECK-INST
: ptrue p15.s
56 // CHECK-ENCODING
: [0xef,0xe3,0x98,0x25]
57 // CHECK-ERROR
: instruction requires
: sve
58 // CHECK-UNKNOWN
: ef e3
98 25 <unknown
>
61 // CHECK-INST
: ptrue p15.d
62 // CHECK-ENCODING
: [0xef,0xe3,0xd8,0x25]
63 // CHECK-ERROR
: instruction requires
: sve
64 // CHECK-UNKNOWN
: ef e3 d8
25 <unknown
>
66 // ---------------------------------------------------------------------------//
67 // Test available patterns
68 // ---------------------------------------------------------------------------//
71 // CHECK-INST
: ptrue p7.s
, vl1
72 // CHECK-ENCODING
: [0x27,0xe0,0x98,0x25]
73 // CHECK-ERROR
: instruction requires
: sve
74 // CHECK-UNKNOWN
: 27 e0
98 25 <unknown
>
77 // CHECK-INST
: ptrue p7.s
, vl1
78 // CHECK-ENCODING
: [0x27,0xe0,0x98,0x25]
79 // CHECK-ERROR
: instruction requires
: sve
80 // CHECK-UNKNOWN
: 27 e0
98 25 <unknown
>
83 // CHECK-INST
: ptrue p7.s
, vl2
84 // CHECK-ENCODING
: [0x47,0xe0,0x98,0x25]
85 // CHECK-ERROR
: instruction requires
: sve
86 // CHECK-UNKNOWN
: 47 e0
98 25 <unknown
>
89 // CHECK-INST
: ptrue p7.s
, vl3
90 // CHECK-ENCODING
: [0x67,0xe0,0x98,0x25]
91 // CHECK-ERROR
: instruction requires
: sve
92 // CHECK-UNKNOWN
: 67 e0
98 25 <unknown
>
95 // CHECK-INST
: ptrue p7.s
, vl4
96 // CHECK-ENCODING
: [0x87,0xe0,0x98,0x25]
97 // CHECK-ERROR
: instruction requires
: sve
98 // CHECK-UNKNOWN
: 87 e0
98 25 <unknown
>
101 // CHECK-INST
: ptrue p7.s
, vl5
102 // CHECK-ENCODING
: [0xa7,0xe0,0x98,0x25]
103 // CHECK-ERROR
: instruction requires
: sve
104 // CHECK-UNKNOWN
: a7 e0
98 25 <unknown
>
107 // CHECK-INST
: ptrue p7.s
, vl6
108 // CHECK-ENCODING
: [0xc7,0xe0,0x98,0x25]
109 // CHECK-ERROR
: instruction requires
: sve
110 // CHECK-UNKNOWN
: c7 e0
98 25 <unknown
>
113 // CHECK-INST
: ptrue p7.s
, vl7
114 // CHECK-ENCODING
: [0xe7,0xe0,0x98,0x25]
115 // CHECK-ERROR
: instruction requires
: sve
116 // CHECK-UNKNOWN
: e7 e0
98 25 <unknown
>
119 // CHECK-INST
: ptrue p7.s
, vl8
120 // CHECK-ENCODING
: [0x07,0xe1,0x98,0x25]
121 // CHECK-ERROR
: instruction requires
: sve
122 // CHECK-UNKNOWN
: 07 e1
98 25 <unknown
>
125 // CHECK-INST
: ptrue p7.s
, vl16
126 // CHECK-ENCODING
: [0x27,0xe1,0x98,0x25]
127 // CHECK-ERROR
: instruction requires
: sve
128 // CHECK-UNKNOWN
: 27 e1
98 25 <unknown
>
131 // CHECK-INST
: ptrue p7.s
, vl32
132 // CHECK-ENCODING
: [0x47,0xe1,0x98,0x25]
133 // CHECK-ERROR
: instruction requires
: sve
134 // CHECK-UNKNOWN
: 47 e1
98 25 <unknown
>
137 // CHECK-INST
: ptrue p7.s
, vl64
138 // CHECK-ENCODING
: [0x67,0xe1,0x98,0x25]
139 // CHECK-ERROR
: instruction requires
: sve
140 // CHECK-UNKNOWN
: 67 e1
98 25 <unknown
>
143 // CHECK-INST
: ptrue p7.s
, vl128
144 // CHECK-ENCODING
: [0x87,0xe1,0x98,0x25]
145 // CHECK-ERROR
: instruction requires
: sve
146 // CHECK-UNKNOWN
: 87 e1
98 25 <unknown
>
149 // CHECK-INST
: ptrue p7.s
, vl256
150 // CHECK-ENCODING
: [0xa7,0xe1,0x98,0x25]
151 // CHECK-ERROR
: instruction requires
: sve
152 // CHECK-UNKNOWN
: a7 e1
98 25 <unknown
>
155 // CHECK-INST
: ptrue p7.s
, mul4
156 // CHECK-ENCODING
: [0xa7,0xe3,0x98,0x25]
157 // CHECK-ERROR
: instruction requires
: sve
158 // CHECK-UNKNOWN
: a7 e3
98 25 <unknown
>
161 // CHECK-INST
: ptrue p7.s
, mul3
162 // CHECK-ENCODING
: [0xc7,0xe3,0x98,0x25]
163 // CHECK-ERROR
: instruction requires
: sve
164 // CHECK-UNKNOWN
: c7 e3
98 25 <unknown
>
167 // CHECK-INST
: ptrue p7.s
168 // CHECK-ENCODING
: [0xe7,0xe3,0x98,0x25]
169 // CHECK-ERROR
: instruction requires
: sve
170 // CHECK-UNKNOWN
: e7 e3
98 25 <unknown
>
172 // ---------------------------------------------------------------------------//
173 // Test immediate values
not corresponding to
a named pattern
174 // ---------------------------------------------------------------------------//
177 // CHECK-INST
: ptrue p7.s
, #14
178 // CHECK-ENCODING
: [0xc7,0xe1,0x98,0x25]
179 // CHECK-ERROR
: instruction requires
: sve
180 // CHECK-UNKNOWN
: c7 e1
98 25 <unknown
>
183 // CHECK-INST
: ptrue p7.s
, #15
184 // CHECK-ENCODING
: [0xe7,0xe1,0x98,0x25]
185 // CHECK-ERROR
: instruction requires
: sve
186 // CHECK-UNKNOWN
: e7 e1
98 25 <unknown
>
189 // CHECK-INST
: ptrue p7.s
, #16
190 // CHECK-ENCODING
: [0x07,0xe2,0x98,0x25]
191 // CHECK-ERROR
: instruction requires
: sve
192 // CHECK-UNKNOWN
: 07 e2
98 25 <unknown
>
195 // CHECK-INST
: ptrue p7.s
, #17
196 // CHECK-ENCODING
: [0x27,0xe2,0x98,0x25]
197 // CHECK-ERROR
: instruction requires
: sve
198 // CHECK-UNKNOWN
: 27 e2
98 25 <unknown
>
201 // CHECK-INST
: ptrue p7.s
, #18
202 // CHECK-ENCODING
: [0x47,0xe2,0x98,0x25]
203 // CHECK-ERROR
: instruction requires
: sve
204 // CHECK-UNKNOWN
: 47 e2
98 25 <unknown
>
207 // CHECK-INST
: ptrue p7.s
, #19
208 // CHECK-ENCODING
: [0x67,0xe2,0x98,0x25]
209 // CHECK-ERROR
: instruction requires
: sve
210 // CHECK-UNKNOWN
: 67 e2
98 25 <unknown
>
213 // CHECK-INST
: ptrue p7.s
, #20
214 // CHECK-ENCODING
: [0x87,0xe2,0x98,0x25]
215 // CHECK-ERROR
: instruction requires
: sve
216 // CHECK-UNKNOWN
: 87 e2
98 25 <unknown
>
219 // CHECK-INST
: ptrue p7.s
, #21
220 // CHECK-ENCODING
: [0xa7,0xe2,0x98,0x25]
221 // CHECK-ERROR
: instruction requires
: sve
222 // CHECK-UNKNOWN
: a7 e2
98 25 <unknown
>
225 // CHECK-INST
: ptrue p7.s
, #22
226 // CHECK-ENCODING
: [0xc7,0xe2,0x98,0x25]
227 // CHECK-ERROR
: instruction requires
: sve
228 // CHECK-UNKNOWN
: c7 e2
98 25 <unknown
>
231 // CHECK-INST
: ptrue p7.s
, #23
232 // CHECK-ENCODING
: [0xe7,0xe2,0x98,0x25]
233 // CHECK-ERROR
: instruction requires
: sve
234 // CHECK-UNKNOWN
: e7 e2
98 25 <unknown
>
237 // CHECK-INST
: ptrue p7.s
, #24
238 // CHECK-ENCODING
: [0x07,0xe3,0x98,0x25]
239 // CHECK-ERROR
: instruction requires
: sve
240 // CHECK-UNKNOWN
: 07 e3
98 25 <unknown
>
243 // CHECK-INST
: ptrue p7.s
, #25
244 // CHECK-ENCODING
: [0x27,0xe3,0x98,0x25]
245 // CHECK-ERROR
: instruction requires
: sve
246 // CHECK-UNKNOWN
: 27 e3
98 25 <unknown
>
249 // CHECK-INST
: ptrue p7.s
, #26
250 // CHECK-ENCODING
: [0x47,0xe3,0x98,0x25]
251 // CHECK-ERROR
: instruction requires
: sve
252 // CHECK-UNKNOWN
: 47 e3
98 25 <unknown
>
255 // CHECK-INST
: ptrue p7.s
, #27
256 // CHECK-ENCODING
: [0x67,0xe3,0x98,0x25]
257 // CHECK-ERROR
: instruction requires
: sve
258 // CHECK-UNKNOWN
: 67 e3
98 25 <unknown
>
261 // CHECK-INST
: ptrue p7.s
, #28
262 // CHECK-ENCODING
: [0x87,0xe3,0x98,0x25]
263 // CHECK-ERROR
: instruction requires
: sve
264 // CHECK-UNKNOWN
: 87 e3
98 25 <unknown
>