[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / RISCV / rv32-user-csr-names.s
blobacd66467bfea71ee4abf257768c6b3a1ec52d12c
1 # RUN: llvm-mc %s -triple=riscv32 -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
4 # RUN: | llvm-objdump -d - \
5 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
7 ##################################
8 # User Counter and Timers
9 ##################################
11 # cycleh
12 # name
13 # CHECK-INST: csrrs t1, cycleh, zero
14 # CHECK-ENC: encoding: [0x73,0x23,0x00,0xc8]
15 # CHECK-INST-ALIAS: rdcycleh t1
16 # uimm12
17 # CHECK-INST: csrrs t2, cycleh, zero
18 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xc8]
19 # CHECK-INST-ALIAS: rdcycleh t2
20 # name
21 csrrs t1, cycleh, zero
22 # uimm12
23 csrrs t2, 0xC80, zero
25 # timeh
26 # name
27 # CHECK-INST: csrrs t1, timeh, zero
28 # CHECK-ENC: encoding: [0x73,0x23,0x10,0xc8]
29 # CHECK-INST-ALIAS: rdtimeh t1
30 # uimm12
31 # CHECK-INST: csrrs t2, timeh, zero
32 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0xc8]
33 # CHECK-INST-ALIAS: rdtimeh t2
34 # name
35 csrrs t1, timeh, zero
36 # uimm12
37 csrrs t2, 0xC81, zero
39 # instreth
40 # name
41 # CHECK-INST: csrrs t1, instreth, zero
42 # CHECK-ENC: encoding: [0x73,0x23,0x20,0xc8]
43 # CHECK-INST-ALIAS: rdinstreth t1
44 # uimm12
45 # CHECK-INST: csrrs t2, instreth, zero
46 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xc8]
47 # CHECK-INST-ALIAS: rdinstreth t2
48 # name
49 csrrs t1, instreth, zero
50 # uimm12
51 csrrs t2, 0xC82, zero
53 # hpmcounter3h
54 # name
55 # CHECK-INST: csrrs t1, hpmcounter3h, zero
56 # CHECK-ENC: encoding: [0x73,0x23,0x30,0xc8]
57 # CHECK-INST-ALIAS: csrr t1, hpmcounter3h
58 # uimm12
59 # CHECK-INST: csrrs t2, hpmcounter3h, zero
60 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0xc8]
61 # CHECK-INST-ALIAS: csrr t2, hpmcounter3h
62 # name
63 csrrs t1, hpmcounter3h, zero
64 # uimm12
65 csrrs t2, 0xC83, zero
67 # hpmcounter4h
68 # name
69 # CHECK-INST: csrrs t1, hpmcounter4h, zero
70 # CHECK-ENC: encoding: [0x73,0x23,0x40,0xc8]
71 # CHECK-INST-ALIAS: csrr t1, hpmcounter4h
72 # uimm12
73 # CHECK-INST: csrrs t2, hpmcounter4h, zero
74 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0xc8]
75 # CHECK-INST-ALIAS: csrr t2, hpmcounter4h
76 # name
77 csrrs t1, hpmcounter4h, zero
78 # uimm12
79 csrrs t2, 0xC84, zero
81 # hpmcounter5h
82 # name
83 # CHECK-INST: csrrs t1, hpmcounter5h, zero
84 # CHECK-ENC: encoding: [0x73,0x23,0x50,0xc8]
85 # CHECK-INST-ALIAS: csrr t1, hpmcounter5h
86 # uimm12
87 # CHECK-INST: csrrs t2, hpmcounter5h, zero
88 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0xc8]
89 # CHECK-INST-ALIAS: csrr t2, hpmcounter5h
90 # name
91 csrrs t1, hpmcounter5h, zero
92 # uimm12
93 csrrs t2, 0xC85, zero
95 # hpmcounter6h
96 # name
97 # CHECK-INST: csrrs t1, hpmcounter6h, zero
98 # CHECK-ENC: encoding: [0x73,0x23,0x60,0xc8]
99 # CHECK-INST-ALIAS: csrr t1, hpmcounter6h
100 # uimm12
101 # CHECK-INST: csrrs t2, hpmcounter6h, zero
102 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0xc8]
103 # CHECK-INST-ALIAS: csrr t2, hpmcounter6h
104 # name
105 csrrs t1, hpmcounter6h, zero
106 # uimm12
107 csrrs t2, 0xC86, zero
109 # hpmcounter7h
110 # name
111 # CHECK-INST: csrrs t1, hpmcounter7h, zero
112 # CHECK-ENC: encoding: [0x73,0x23,0x70,0xc8]
113 # CHECK-INST-ALIAS: csrr t1, hpmcounter7h
114 # uimm12
115 # CHECK-INST: csrrs t2, hpmcounter7h, zero
116 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0xc8]
117 # CHECK-INST-ALIAS: csrr t2, hpmcounter7h
118 # name
119 csrrs t1, hpmcounter7h, zero
120 # uimm12
121 csrrs t2, 0xC87, zero
123 # hpmcounter8h
124 # name
125 # CHECK-INST: csrrs t1, hpmcounter8h, zero
126 # CHECK-ENC: encoding: [0x73,0x23,0x80,0xc8]
127 # CHECK-INST-ALIAS: csrr t1, hpmcounter8h
128 # uimm12
129 # CHECK-INST: csrrs t2, hpmcounter8h, zero
130 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0xc8]
131 # CHECK-INST-ALIAS: csrr t2, hpmcounter8h
132 # name
133 csrrs t1, hpmcounter8h, zero
134 # uimm12
135 csrrs t2, 0xC88, zero
137 # hpmcounter9h
138 # name
139 # CHECK-INST: csrrs t1, hpmcounter9h, zero
140 # CHECK-ENC: encoding: [0x73,0x23,0x90,0xc8]
141 # CHECK-INST-ALIAS: csrr t1, hpmcounter9h
142 # uimm12
143 # CHECK-INST: csrrs t2, hpmcounter9h, zero
144 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0xc8]
145 # CHECK-INST-ALIAS: csrr t2, hpmcounter9h
146 # name
147 csrrs t1, hpmcounter9h, zero
148 # uimm12
149 csrrs t2, 0xC89, zero
151 # hpmcounter10h
152 # name
153 # CHECK-INST: csrrs t1, hpmcounter10h, zero
154 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0xc8]
155 # CHECK-INST-ALIAS: csrr t1, hpmcounter10h
156 # uimm12
157 # CHECK-INST: csrrs t2, hpmcounter10h, zero
158 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xc8]
159 # CHECK-INST-ALIAS: csrr t2, hpmcounter10h
160 # name
161 csrrs t1, hpmcounter10h, zero
162 # uimm12
163 csrrs t2, 0xC8A, zero
165 # hpmcounter11h
166 # name
167 # CHECK-INST: csrrs t1, hpmcounter11h, zero
168 # CHECK-ENC: encoding: [0x73,0x23,0xb0,0xc8]
169 # CHECK-INST-ALIAS: csrr t1, hpmcounter11h
170 # uimm12
171 # CHECK-INST: csrrs t2, hpmcounter11h, zero
172 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xc8]
173 # CHECK-INST-ALIAS: csrr t2, hpmcounter11h
174 # name
175 csrrs t1, hpmcounter11h, zero
176 # uimm12
177 csrrs t2, 0xC8B, zero
179 # hpmcounter12h
180 # name
181 # CHECK-INST: csrrs t1, hpmcounter12h, zero
182 # CHECK-ENC: encoding: [0x73,0x23,0xc0,0xc8]
183 # CHECK-INST-ALIAS: csrr t1, hpmcounter12h
184 # uimm12
185 # CHECK-INST: csrrs t2, hpmcounter12h, zero
186 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xc8]
187 # CHECK-INST-ALIAS: csrr t2, hpmcounter12h
188 # name
189 csrrs t1, hpmcounter12h, zero
190 # uimm12
191 csrrs t2, 0xC8C, zero
193 # hpmcounter13h
194 # name
195 # CHECK-INST: csrrs t1, hpmcounter13h, zero
196 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0xc8]
197 # CHECK-INST-ALIAS: csrr t1, hpmcounter13h
198 # uimm12
199 # CHECK-INST: csrrs t2, hpmcounter13h, zero
200 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xc8]
201 # CHECK-INST-ALIAS: csrr t2, hpmcounter13h
202 # name
203 csrrs t1, hpmcounter13h, zero
204 # uimm12
205 csrrs t2, 0xC8D, zero
207 # hpmcounter14h
208 # name
209 # CHECK-INST: csrrs t1, hpmcounter14h, zero
210 # CHECK-ENC: encoding: [0x73,0x23,0xe0,0xc8]
211 # CHECK-INST-ALIAS: csrr t1, hpmcounter14h
212 # uimm12
213 # CHECK-INST: csrrs t2, hpmcounter14h, zero
214 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xc8]
215 # CHECK-INST-ALIAS: csrr t2, hpmcounter14h
216 # name
217 csrrs t1, hpmcounter14h, zero
218 # uimm12
219 csrrs t2, 0xC8E, zero
221 # hpmcounter15h
222 # name
223 # CHECK-INST: csrrs t1, hpmcounter15h, zero
224 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0xc8]
225 # CHECK-INST-ALIAS: csrr t1, hpmcounter15h
226 # uimm12
227 # CHECK-INST: csrrs t2, hpmcounter15h, zero
228 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xc8]
229 # CHECK-INST-ALIAS: csrr t2, hpmcounter15h
230 # name
231 csrrs t1, hpmcounter15h, zero
232 # uimm12
233 csrrs t2, 0xC8F, zero
235 # hpmcounter16h
236 # name
237 # CHECK-INST: csrrs t1, hpmcounter16h, zero
238 # CHECK-ENC: encoding: [0x73,0x23,0x00,0xc9]
239 # CHECK-INST-ALIAS: csrr t1, hpmcounter16h
240 # uimm12
241 # CHECK-INST: csrrs t2, hpmcounter16h, zero
242 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xc9]
243 # CHECK-INST-ALIAS: csrr t2, hpmcounter16h
244 # name
245 csrrs t1, hpmcounter16h, zero
246 # uimm12
247 csrrs t2, 0xC90, zero
249 # hpmcounter17h
250 # name
251 # CHECK-INST: csrrs t1, hpmcounter17h, zero
252 # CHECK-ENC: encoding: [0x73,0x23,0x10,0xc9]
253 # CHECK-INST-ALIAS: csrr t1, hpmcounter17h
254 # uimm12
255 # CHECK-INST: csrrs t2, hpmcounter17h, zero
256 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0xc9]
257 # CHECK-INST-ALIAS: csrr t2, hpmcounter17h
258 # name
259 csrrs t1, hpmcounter17h, zero
260 # uimm12
261 csrrs t2, 0xC91, zero
263 # hpmcounter18h
264 # name
265 # CHECK-INST: csrrs t1, hpmcounter18h, zero
266 # CHECK-ENC: encoding: [0x73,0x23,0x20,0xc9]
267 # CHECK-INST-ALIAS: csrr t1, hpmcounter18h
268 # uimm12
269 # CHECK-INST: csrrs t2, hpmcounter18h, zero
270 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xc9]
271 # CHECK-INST-ALIAS: csrr t2, hpmcounter18h
272 # name
273 csrrs t1, hpmcounter18h, zero
274 # uimm12
275 csrrs t2, 0xC92, zero
277 # hpmcounter19h
278 # name
279 # CHECK-INST: csrrs t1, hpmcounter19h, zero
280 # CHECK-ENC: encoding: [0x73,0x23,0x30,0xc9]
281 # CHECK-INST-ALIAS: csrr t1, hpmcounter19h
282 # uimm12
283 # CHECK-INST: csrrs t2, hpmcounter19h, zero
284 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0xc9]
285 # CHECK-INST-ALIAS: csrr t2, hpmcounter19h
286 # name
287 csrrs t1, hpmcounter19h, zero
288 # uimm12
289 csrrs t2, 0xC93, zero
291 # hpmcounter20h
292 # name
293 # CHECK-INST: csrrs t1, hpmcounter20h, zero
294 # CHECK-ENC: encoding: [0x73,0x23,0x40,0xc9]
295 # CHECK-INST-ALIAS: csrr t1, hpmcounter20h
296 # uimm12
297 # CHECK-INST: csrrs t2, hpmcounter20h, zero
298 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0xc9]
299 # CHECK-INST-ALIAS: csrr t2, hpmcounter20h
300 # name
301 csrrs t1, hpmcounter20h, zero
302 # uimm12
303 csrrs t2, 0xC94, zero
305 # hpmcounter21h
306 # name
307 # CHECK-INST: csrrs t1, hpmcounter21h, zero
308 # CHECK-ENC: encoding: [0x73,0x23,0x50,0xc9]
309 # CHECK-INST-ALIAS: csrr t1, hpmcounter21h
310 # uimm12
311 # CHECK-INST: csrrs t2, hpmcounter21h, zero
312 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0xc9]
313 # CHECK-INST-ALIAS: csrr t2, hpmcounter21h
314 # name
315 csrrs t1, hpmcounter21h, zero
316 # uimm12
317 csrrs t2, 0xC95, zero
319 # hpmcounter22h
320 # name
321 # CHECK-INST: csrrs t1, hpmcounter22h, zero
322 # CHECK-ENC: encoding: [0x73,0x23,0x60,0xc9]
323 # CHECK-INST-ALIAS: csrr t1, hpmcounter22h
324 # uimm12
325 # CHECK-INST: csrrs t2, hpmcounter22h, zero
326 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0xc9]
327 # CHECK-INST-ALIAS: csrr t2, hpmcounter22h
328 # name
329 csrrs t1, hpmcounter22h, zero
330 # uimm12
331 csrrs t2, 0xC96, zero
333 # hpmcounter23h
334 # name
335 # CHECK-INST: csrrs t1, hpmcounter23h, zero
336 # CHECK-ENC: encoding: [0x73,0x23,0x70,0xc9]
337 # CHECK-INST-ALIAS: csrr t1, hpmcounter23h
338 # uimm12
339 # CHECK-INST: csrrs t2, hpmcounter23h, zero
340 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0xc9]
341 # CHECK-INST-ALIAS: csrr t2, hpmcounter23h
342 # name
343 csrrs t1, hpmcounter23h, zero
344 # uimm12
345 csrrs t2, 0xC97, zero
347 # hpmcounter24h
348 # name
349 # CHECK-INST: csrrs t1, hpmcounter24h, zero
350 # CHECK-ENC: encoding: [0x73,0x23,0x80,0xc9]
351 # CHECK-INST-ALIAS: csrr t1, hpmcounter24h
352 # uimm12
353 # CHECK-INST: csrrs t2, hpmcounter24h, zero
354 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0xc9]
355 # CHECK-INST-ALIAS: csrr t2, hpmcounter24h
356 # name
357 csrrs t1, hpmcounter24h, zero
358 # uimm12
359 csrrs t2, 0xC98, zero
361 # hpmcounter25h
362 # name
363 # CHECK-INST: csrrs t1, hpmcounter25h, zero
364 # CHECK-ENC: encoding: [0x73,0x23,0x90,0xc9]
365 # CHECK-INST-ALIAS: csrr t1, hpmcounter25h
366 # uimm12
367 # CHECK-INST: csrrs t2, hpmcounter25h, zero
368 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0xc9]
369 # CHECK-INST-ALIAS: csrr t2, hpmcounter25h
370 # name
371 csrrs t1, hpmcounter25h, zero
372 # uimm12
373 csrrs t2, 0xC99, zero
375 # hpmcounter26h
376 # name
377 # CHECK-INST: csrrs t1, hpmcounter26h, zero
378 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0xc9]
379 # CHECK-INST-ALIAS: csrr t1, hpmcounter26h
380 # uimm12
381 # CHECK-INST: csrrs t2, hpmcounter26h, zero
382 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xc9]
383 # CHECK-INST-ALIAS: csrr t2, hpmcounter26h
384 # name
385 csrrs t1, hpmcounter26h, zero
386 # uimm12
387 csrrs t2, 0xC9A, zero
389 # hpmcounter27h
390 # name
391 # CHECK-INST: csrrs t1, hpmcounter27h, zero
392 # CHECK-ENC: encoding: [0x73,0x23,0xb0,0xc9]
393 # CHECK-INST-ALIAS: csrr t1, hpmcounter27h
394 # uimm12
395 # CHECK-INST: csrrs t2, hpmcounter27h, zero
396 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xc9]
397 # CHECK-INST-ALIAS: csrr t2, hpmcounter27h
398 # name
399 csrrs t1, hpmcounter27h, zero
400 # uimm12
401 csrrs t2, 0xC9B, zero
403 # hpmcounter28h
404 # name
405 # CHECK-INST: csrrs t1, hpmcounter28h, zero
406 # CHECK-ENC: encoding: [0x73,0x23,0xc0,0xc9]
407 # CHECK-INST-ALIAS: csrr t1, hpmcounter28h
408 # uimm12
409 # CHECK-INST: csrrs t2, hpmcounter28h, zero
410 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xc9]
411 # CHECK-INST-ALIAS: csrr t2, hpmcounter28h
412 # name
413 csrrs t1, hpmcounter28h, zero
414 # uimm12
415 csrrs t2, 0xC9C, zero
417 # hpmcounter29h
418 # name
419 # CHECK-INST: csrrs t1, hpmcounter29h, zero
420 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0xc9]
421 # CHECK-INST-ALIAS: csrr t1, hpmcounter29h
422 # uimm12
423 # CHECK-INST: csrrs t2, hpmcounter29h, zero
424 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xc9]
425 # CHECK-INST-ALIAS: csrr t2, hpmcounter29h
426 # name
427 csrrs t1, hpmcounter29h, zero
428 # uimm12
429 csrrs t2, 0xC9D, zero
431 # hpmcounter30h
432 # name
433 # CHECK-INST: csrrs t1, hpmcounter30h, zero
434 # CHECK-ENC: encoding: [0x73,0x23,0xe0,0xc9]
435 # CHECK-INST-ALIAS: csrr t1, hpmcounter30h
436 # uimm12
437 # CHECK-INST: csrrs t2, hpmcounter30h, zero
438 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xc9]
439 # CHECK-INST-ALIAS: csrr t2, hpmcounter30h
440 # name
441 csrrs t1, hpmcounter30h, zero
442 # uimm12
443 csrrs t2, 0xC9E, zero
445 # hpmcounter31h
446 # name
447 # CHECK-INST: csrrs t1, hpmcounter31h, zero
448 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0xc9]
449 # CHECK-INST-ALIAS: csrr t1, hpmcounter31h
450 # uimm12
451 # CHECK-INST: csrrs t2, hpmcounter31h, zero
452 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xc9]
453 # CHECK-INST-ALIAS: csrr t2, hpmcounter31h
454 # name
455 csrrs t1, hpmcounter31h, zero
456 # uimm12
457 csrrs t2, 0xC9F, zero