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 possible prefetch operation specifiers
14 // CHECK-INST
: prfw pldl1keep
, p0
, [x0
]
15 // CHECK-ENCODING
: [0x00,0x40,0xc0,0x85]
16 // CHECK-ERROR
: instruction requires
: sve
17 // CHECK-UNKNOWN
: 00 40 c0
85 <unknown
>
19 prfw pldl1keep
, p0
, [x0
]
20 // CHECK-INST
: prfw pldl1keep
, p0
, [x0
]
21 // CHECK-ENCODING
: [0x00,0x40,0xc0,0x85]
22 // CHECK-ERROR
: instruction requires
: sve
23 // CHECK-UNKNOWN
: 00 40 c0
85 <unknown
>
26 // CHECK-INST
: prfw pldl1strm
, p0
, [x0
]
27 // CHECK-ENCODING
: [0x01,0x40,0xc0,0x85]
28 // CHECK-ERROR
: instruction requires
: sve
29 // CHECK-UNKNOWN
: 01 40 c0
85 <unknown
>
31 prfw pldl1strm
, p0
, [x0
]
32 // CHECK-INST
: prfw pldl1strm
, p0
, [x0
]
33 // CHECK-ENCODING
: [0x01,0x40,0xc0,0x85]
34 // CHECK-ERROR
: instruction requires
: sve
35 // CHECK-UNKNOWN
: 01 40 c0
85 <unknown
>
38 // CHECK-INST
: prfw pldl2keep
, p0
, [x0
]
39 // CHECK-ENCODING
: [0x02,0x40,0xc0,0x85]
40 // CHECK-ERROR
: instruction requires
: sve
41 // CHECK-UNKNOWN
: 02 40 c0
85 <unknown
>
43 prfw pldl2keep
, p0
, [x0
]
44 // CHECK-INST
: prfw pldl2keep
, p0
, [x0
]
45 // CHECK-ENCODING
: [0x02,0x40,0xc0,0x85]
46 // CHECK-ERROR
: instruction requires
: sve
47 // CHECK-UNKNOWN
: 02 40 c0
85 <unknown
>
50 // CHECK-INST
: prfw pldl2strm
, p0
, [x0
]
51 // CHECK-ENCODING
: [0x03,0x40,0xc0,0x85]
52 // CHECK-ERROR
: instruction requires
: sve
53 // CHECK-UNKNOWN
: 03 40 c0
85 <unknown
>
55 prfw pldl2strm
, p0
, [x0
]
56 // CHECK-INST
: prfw pldl2strm
, p0
, [x0
]
57 // CHECK-ENCODING
: [0x03,0x40,0xc0,0x85]
58 // CHECK-ERROR
: instruction requires
: sve
59 // CHECK-UNKNOWN
: 03 40 c0
85 <unknown
>
62 // CHECK-INST
: prfw pldl3keep
, p0
, [x0
]
63 // CHECK-ENCODING
: [0x04,0x40,0xc0,0x85]
64 // CHECK-ERROR
: instruction requires
: sve
65 // CHECK-UNKNOWN
: 04 40 c0
85 <unknown
>
67 prfw pldl3keep
, p0
, [x0
]
68 // CHECK-INST
: prfw pldl3keep
, p0
, [x0
]
69 // CHECK-ENCODING
: [0x04,0x40,0xc0,0x85]
70 // CHECK-ERROR
: instruction requires
: sve
71 // CHECK-UNKNOWN
: 04 40 c0
85 <unknown
>
74 // CHECK-INST
: prfw pldl3strm
, p0
, [x0
]
75 // CHECK-ENCODING
: [0x05,0x40,0xc0,0x85]
76 // CHECK-ERROR
: instruction requires
: sve
77 // CHECK-UNKNOWN
: 05 40 c0
85 <unknown
>
79 prfw pldl3strm
, p0
, [x0
]
80 // CHECK-INST
: prfw pldl3strm
, p0
, [x0
]
81 // CHECK-ENCODING
: [0x05,0x40,0xc0,0x85]
82 // CHECK-ERROR
: instruction requires
: sve
83 // CHECK-UNKNOWN
: 05 40 c0
85 <unknown
>
86 // CHECK-INST
: prfw
#6, p0, [x0]
87 // CHECK-ENCODING
: [0x06,0x40,0xc0,0x85]
88 // CHECK-ERROR
: instruction requires
: sve
89 // CHECK-UNKNOWN
: 06 40 c0
85 <unknown
>
92 // CHECK-INST
: prfw
#7, p0, [x0]
93 // CHECK-ENCODING
: [0x07,0x40,0xc0,0x85]
94 // CHECK-ERROR
: instruction requires
: sve
95 // CHECK-UNKNOWN
: 07 40 c0
85 <unknown
>
98 // CHECK-INST
: prfw pstl1keep
, p0
, [x0
]
99 // CHECK-ENCODING
: [0x08,0x40,0xc0,0x85]
100 // CHECK-ERROR
: instruction requires
: sve
101 // CHECK-UNKNOWN
: 08 40 c0
85 <unknown
>
103 prfw pstl1keep
, p0
, [x0
]
104 // CHECK-INST
: prfw pstl1keep
, p0
, [x0
]
105 // CHECK-ENCODING
: [0x08,0x40,0xc0,0x85]
106 // CHECK-ERROR
: instruction requires
: sve
107 // CHECK-UNKNOWN
: 08 40 c0
85 <unknown
>
110 // CHECK-INST
: prfw pstl1strm
, p0
, [x0
]
111 // CHECK-ENCODING
: [0x09,0x40,0xc0,0x85]
112 // CHECK-ERROR
: instruction requires
: sve
113 // CHECK-UNKNOWN
: 09 40 c0
85 <unknown
>
115 prfw pstl1strm
, p0
, [x0
]
116 // CHECK-INST
: prfw pstl1strm
, p0
, [x0
]
117 // CHECK-ENCODING
: [0x09,0x40,0xc0,0x85]
118 // CHECK-ERROR
: instruction requires
: sve
119 // CHECK-UNKNOWN
: 09 40 c0
85 <unknown
>
122 // CHECK-INST
: prfw pstl2keep
, p0
, [x0
]
123 // CHECK-ENCODING
: [0x0a,0x40,0xc0,0x85]
124 // CHECK-ERROR
: instruction requires
: sve
125 // CHECK-UNKNOWN
: 0a 40 c0
85 <unknown
>
127 prfw pstl2keep
, p0
, [x0
]
128 // CHECK-INST
: prfw pstl2keep
, p0
, [x0
]
129 // CHECK-ENCODING
: [0x0a,0x40,0xc0,0x85]
130 // CHECK-ERROR
: instruction requires
: sve
131 // CHECK-UNKNOWN
: 0a 40 c0
85 <unknown
>
134 // CHECK-INST
: prfw pstl2strm
, p0
, [x0
]
135 // CHECK-ENCODING
: [0x0b,0x40,0xc0,0x85]
136 // CHECK-ERROR
: instruction requires
: sve
137 // CHECK-UNKNOWN
: 0b 40 c0
85 <unknown
>
139 prfw pstl2strm
, p0
, [x0
]
140 // CHECK-INST
: prfw pstl2strm
, p0
, [x0
]
141 // CHECK-ENCODING
: [0x0b,0x40,0xc0,0x85]
142 // CHECK-ERROR
: instruction requires
: sve
143 // CHECK-UNKNOWN
: 0b 40 c0
85 <unknown
>
146 // CHECK-INST
: prfw pstl3keep
, p0
, [x0
]
147 // CHECK-ENCODING
: [0x0c,0x40,0xc0,0x85]
148 // CHECK-ERROR
: instruction requires
: sve
149 // CHECK-UNKNOWN
: 0c
40 c0
85 <unknown
>
151 prfw pstl3keep
, p0
, [x0
]
152 // CHECK-INST
: prfw pstl3keep
, p0
, [x0
]
153 // CHECK-ENCODING
: [0x0c,0x40,0xc0,0x85]
154 // CHECK-ERROR
: instruction requires
: sve
155 // CHECK-UNKNOWN
: 0c
40 c0
85 <unknown
>
158 // CHECK-INST
: prfw pstl3strm
, p0
, [x0
]
159 // CHECK-ENCODING
: [0x0d,0x40,0xc0,0x85]
160 // CHECK-ERROR
: instruction requires
: sve
161 // CHECK-UNKNOWN
: 0d
40 c0
85 <unknown
>
163 prfw pstl3strm
, p0
, [x0
]
164 // CHECK-INST
: prfw pstl3strm
, p0
, [x0
]
165 // CHECK-ENCODING
: [0x0d,0x40,0xc0,0x85]
166 // CHECK-ERROR
: instruction requires
: sve
167 // CHECK-UNKNOWN
: 0d
40 c0
85 <unknown
>
170 // CHECK-INST
: prfw
#14, p0, [x0]
171 // CHECK-ENCODING
: [0x0e,0x40,0xc0,0x85]
172 // CHECK-ERROR
: instruction requires
: sve
173 // CHECK-UNKNOWN
: 0e
40 c0
85 <unknown
>
176 // CHECK-INST
: prfw
#15, p0, [x0]
177 // CHECK-ENCODING
: [0x0f,0x40,0xc0,0x85]
178 // CHECK-ERROR
: instruction requires
: sve
179 // CHECK-UNKNOWN
: 0f
40 c0
85 <unknown
>
181 // --------------------------------------------------------------------------//
182 // Test addressing modes
184 prfw pldl1strm
, p0
, [x0
, #-32, mul vl]
185 // CHECK-INST
: prfw pldl1strm
, p0
, [x0
, #-32, mul vl]
186 // CHECK-ENCODING
: [0x01,0x40,0xe0,0x85]
187 // CHECK-ERROR
: instruction requires
: sve
188 // CHECK-UNKNOWN
: 01 40 e0
85
190 prfw pldl1strm
, p0
, [x0
, #31, mul vl]
191 // CHECK-INST
: prfw pldl1strm
, p0
, [x0
, #31, mul vl]
192 // CHECK-ENCODING
: [0x01,0x40,0xdf,0x85]
193 // CHECK-ERROR
: instruction requires
: sve
194 // CHECK-UNKNOWN
: 01 40 df
85
196 prfw pldl1keep
, p0
, [x0
, z0.s
, uxtw
#2]
197 // CHECK-INST
: prfw pldl1keep
, p0
, [x0
, z0.s
, uxtw
#2]
198 // CHECK-ENCODING
: [0x00,0x40,0x20,0x84]
199 // CHECK-ERROR
: instruction requires
: sve
200 // CHECK-UNKNOWN
: 00 40 20 84 <unknown
>
202 prfw pldl3strm
, p5
, [x10
, z21.s
, sxtw
#2]
203 // CHECK-INST
: prfw pldl3strm
, p5
, [x10
, z21.s
, sxtw
#2]
204 // CHECK-ENCODING
: [0x45,0x55,0x75,0x84]
205 // CHECK-ERROR
: instruction requires
: sve
206 // CHECK-UNKNOWN
: 45 55 75 84 <unknown
>
208 prfw
#7, p3, [x13, z8.d, uxtw #2]
209 // CHECK-INST
: prfw
#7, p3, [x13, z8.d, uxtw #2]
210 // CHECK-ENCODING
: [0xa7,0x4d,0x28,0xc4]
211 // CHECK-ERROR
: instruction requires
: sve
212 // CHECK-UNKNOWN
: a7
4d
28 c4
<unknown
>
214 prfw pldl1keep
, p0
, [x0
, z0.d
, sxtw
#2]
215 // CHECK-INST
: prfw pldl1keep
, p0
, [x0
, z0.d
, sxtw
#2]
216 // CHECK-ENCODING
: [0x00,0x40,0x60,0xc4]
217 // CHECK-ERROR
: instruction requires
: sve
218 // CHECK-UNKNOWN
: 00 40 60 c4
<unknown
>
220 prfw pldl3strm
, p5
, [x10
, z21.d
, lsl
#2]
221 // CHECK-INST
: prfw pldl3strm
, p5
, [x10
, z21.d
, lsl
#2]
222 // CHECK-ENCODING
: [0x45,0xd5,0x75,0xc4]
223 // CHECK-ERROR
: instruction requires
: sve
224 // CHECK-UNKNOWN
: 45 d5
75 c4
<unknown
>
226 prfw
#15, p7, [z31.s, #0]
227 // CHECK-INST
: prfw
#15, p7, [z31.s]
228 // CHECK-ENCODING
: [0xef,0xff,0x00,0x85]
229 // CHECK-ERROR
: instruction requires
: sve
230 // CHECK-UNKNOWN
: ef ff
00 85 <unknown
>
232 prfw
#15, p7, [z31.s, #124]
233 // CHECK-INST
: prfw
#15, p7, [z31.s, #124]
234 // CHECK-ENCODING
: [0xef,0xff,0x1f,0x85]
235 // CHECK-ERROR
: instruction requires
: sve
236 // CHECK-UNKNOWN
: ef ff
1f
85 <unknown
>
238 prfw
#15, p7, [z31.d, #0]
239 // CHECK-INST
: prfw
#15, p7, [z31.d]
240 // CHECK-ENCODING
: [0xef,0xff,0x00,0xc5]
241 // CHECK-ERROR
: instruction requires
: sve
242 // CHECK-UNKNOWN
: ef ff
00 c5
<unknown
>
244 prfw
#15, p7, [z31.d, #124]
245 // CHECK-INST
: prfw
#15, p7, [z31.d, #124]
246 // CHECK-ENCODING
: [0xef,0xff,0x1f,0xc5]
247 // CHECK-ERROR
: instruction requires
: sve
248 // CHECK-UNKNOWN
: ef ff
1f c5
<unknown
>