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