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