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 ######################################
9 ######################################
13 # CHECK-INST: csrrs t1, mstatush, zero
14 # CHECK-ENC: encoding: [0x73,0x23,0x00,0x31]
15 # CHECK-INST-ALIAS: csrr t1, mstatush
17 # CHECK-INST: csrrs t2, mstatush, zero
18 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0x31]
19 # CHECK-INST-ALIAS: csrr t2, mstatush
21 csrrs t1
, mstatush
, zero
25 #########################
26 # Machine Configuration
27 #########################
31 # CHECK-INST: csrrs t1, menvcfgh, zero
32 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0x31]
33 # CHECK-INST-ALIAS: csrr t1, menvcfgh
35 # CHECK-INST: csrrs t2, menvcfgh, zero
36 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0x31]
37 # CHECK-INST-ALIAS: csrr t2, menvcfgh
39 csrrs t1
, menvcfgh
, zero
45 # CHECK-INST: csrrs t1, mseccfgh, zero
46 # CHECK-ENC: encoding: [0x73,0x23,0x70,0x75]
47 # CHECK-INST-ALIAS: csrr t1, mseccfgh
49 # CHECK-INST: csrrs t2, mseccfgh, zero
50 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0x75]
51 # CHECK-INST-ALIAS: csrr t2, mseccfgh
53 csrrs t1
, mseccfgh
, zero
57 ######################################
58 # Machine Protection and Translation
59 ######################################
63 # CHECK-INST: csrrs t1, pmpcfg1, zero
64 # CHECK-ENC: encoding: [0x73,0x23,0x10,0x3a]
65 # CHECK-INST-ALIAS: csrr t1, pmpcfg1
67 # CHECK-INST: csrrs t2, pmpcfg1, zero
68 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0x3a]
69 # CHECK-INST-ALIAS: csrr t2, pmpcfg1
71 csrrs t1
, pmpcfg1
, zero
77 # CHECK-INST: csrrs t1, pmpcfg3, zero
78 # CHECK-ENC: encoding: [0x73,0x23,0x30,0x3a]
79 # CHECK-INST-ALIAS: csrr t1, pmpcfg3
81 # CHECK-INST: csrrs t2, pmpcfg3, zero
82 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0x3a]
83 # CHECK-INST-ALIAS: csrr t2, pmpcfg3
85 csrrs t1
, pmpcfg3
, zero
91 # CHECK-INST: csrrs t1, pmpcfg5, zero
92 # CHECK-ENC: encoding: [0x73,0x23,0x50,0x3a]
93 # CHECK-INST-ALIAS: csrr t1, pmpcfg5
95 # CHECK-INST: csrrs t2, pmpcfg5, zero
96 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0x3a]
97 # CHECK-INST-ALIAS: csrr t2, pmpcfg5
99 csrrs t1
, pmpcfg5
, zero
101 csrrs t2
, 0x3A5, zero
105 # CHECK-INST: csrrs t1, pmpcfg7, zero
106 # CHECK-ENC: encoding: [0x73,0x23,0x70,0x3a]
107 # CHECK-INST-ALIAS: csrr t1, pmpcfg7
109 # CHECK-INST: csrrs t2, pmpcfg7, zero
110 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0x3a]
111 # CHECK-INST-ALIAS: csrr t2, pmpcfg7
113 csrrs t1
, pmpcfg7
, zero
115 csrrs t2
, 0x3A7, zero
119 # CHECK-INST: csrrs t1, pmpcfg9, zero
120 # CHECK-ENC: encoding: [0x73,0x23,0x90,0x3a]
121 # CHECK-INST-ALIAS: csrr t1, pmpcfg9
123 # CHECK-INST: csrrs t2, pmpcfg9, zero
124 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0x3a]
125 # CHECK-INST-ALIAS: csrr t2, pmpcfg9
127 csrrs t1
, pmpcfg9
, zero
129 csrrs t2
, 0x3A9, zero
133 # CHECK-INST: csrrs t1, pmpcfg11, zero
134 # CHECK-ENC: encoding: [0x73,0x23,0xb0,0x3a]
135 # CHECK-INST-ALIAS: csrr t1, pmpcfg11
137 # CHECK-INST: csrrs t2, pmpcfg11, zero
138 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0x3a]
139 # CHECK-INST-ALIAS: csrr t2, pmpcfg11
141 csrrs t1
, pmpcfg11
, zero
143 csrrs t2
, 0x3AB, zero
147 # CHECK-INST: csrrs t1, pmpcfg13, zero
148 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0x3a]
149 # CHECK-INST-ALIAS: csrr t1, pmpcfg13
151 # CHECK-INST: csrrs t2, pmpcfg13, zero
152 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0x3a]
153 # CHECK-INST-ALIAS: csrr t2, pmpcfg13
155 csrrs t1
, pmpcfg13
, zero
157 csrrs t2
, 0x3AD, zero
161 # CHECK-INST: csrrs t1, pmpcfg15, zero
162 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0x3a]
163 # CHECK-INST-ALIAS: csrr t1, pmpcfg15
165 # CHECK-INST: csrrs t2, pmpcfg15, zero
166 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0x3a]
167 # CHECK-INST-ALIAS: csrr t2, pmpcfg15
169 csrrs t1
, pmpcfg15
, zero
171 csrrs t2
, 0x3AF, zero
173 ######################################
174 # Machine Counter and Timers
175 ######################################
178 # CHECK-INST: csrrs t1, mcycleh, zero
179 # CHECK-ENC: encoding: [0x73,0x23,0x00,0xb8]
180 # CHECK-INST-ALIAS: csrr t1, mcycleh
182 # CHECK-INST: csrrs t2, mcycleh, zero
183 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xb8]
184 # CHECK-INST-ALIAS: csrr t2, mcycleh
185 csrrs t1
, mcycleh
, zero
187 csrrs t2
, 0xB80, zero
191 # CHECK-INST: csrrs t1, minstreth, zero
192 # CHECK-ENC: encoding: [0x73,0x23,0x20,0xb8]
193 # CHECK-INST-ALIAS: csrr t1, minstreth
195 # CHECK-INST: csrrs t2, minstreth, zero
196 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xb8]
197 # CHECK-INST-ALIAS: csrr t2, minstreth
199 csrrs t1
, minstreth
, zero
201 csrrs t2
, 0xB82, zero
205 # CHECK-INST: csrrs t1, mhpmcounter3h, zero
206 # CHECK-ENC: encoding: [0x73,0x23,0x30,0xb8]
207 # CHECK-INST-ALIAS: csrr t1, mhpmcounter3h
209 # CHECK-INST: csrrs t2, mhpmcounter3h, zero
210 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0xb8]
211 # CHECK-INST-ALIAS: csrr t2, mhpmcounter3h
213 csrrs t1
, mhpmcounter3h
, zero
215 csrrs t2
, 0xB83, zero
219 # CHECK-INST: csrrs t1, mhpmcounter4h, zero
220 # CHECK-ENC: encoding: [0x73,0x23,0x40,0xb8]
221 # CHECK-INST-ALIAS: csrr t1, mhpmcounter4h
223 # CHECK-INST: csrrs t2, mhpmcounter4h, zero
224 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0xb8]
225 # CHECK-INST-ALIAS: csrr t2, mhpmcounter4h
227 csrrs t1
, mhpmcounter4h
, zero
229 csrrs t2
, 0xB84, zero
233 # CHECK-INST: csrrs t1, mhpmcounter5h, zero
234 # CHECK-ENC: encoding: [0x73,0x23,0x50,0xb8]
235 # CHECK-INST-ALIAS: csrr t1, mhpmcounter5h
237 # CHECK-INST: csrrs t2, mhpmcounter5h, zero
238 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0xb8]
239 # CHECK-INST-ALIAS: csrr t2, mhpmcounter5h
241 csrrs t1
, mhpmcounter5h
, zero
243 csrrs t2
, 0xB85, zero
247 # CHECK-INST: csrrs t1, mhpmcounter6h, zero
248 # CHECK-ENC: encoding: [0x73,0x23,0x60,0xb8]
249 # CHECK-INST-ALIAS: csrr t1, mhpmcounter6h
251 # CHECK-INST: csrrs t2, mhpmcounter6h, zero
252 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0xb8]
253 # CHECK-INST-ALIAS: csrr t2, mhpmcounter6h
255 csrrs t1
, mhpmcounter6h
, zero
257 csrrs t2
, 0xB86, zero
261 # CHECK-INST: csrrs t1, mhpmcounter7h, zero
262 # CHECK-ENC: encoding: [0x73,0x23,0x70,0xb8]
263 # CHECK-INST-ALIAS: csrr t1, mhpmcounter7h
265 # CHECK-INST: csrrs t2, mhpmcounter7h, zero
266 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0xb8]
267 # CHECK-INST-ALIAS: csrr t2, mhpmcounter7h
269 csrrs t1
, mhpmcounter7h
, zero
271 csrrs t2
, 0xB87, zero
275 # CHECK-INST: csrrs t1, mhpmcounter8h, zero
276 # CHECK-ENC: encoding: [0x73,0x23,0x80,0xb8]
277 # CHECK-INST-ALIAS: csrr t1, mhpmcounter8h
279 # CHECK-INST: csrrs t2, mhpmcounter8h, zero
280 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0xb8]
281 # CHECK-INST-ALIAS: csrr t2, mhpmcounter8h
283 csrrs t1
, mhpmcounter8h
, zero
285 csrrs t2
, 0xB88, zero
289 # CHECK-INST: csrrs t1, mhpmcounter9h, zero
290 # CHECK-ENC: encoding: [0x73,0x23,0x90,0xb8]
291 # CHECK-INST-ALIAS: csrr t1, mhpmcounter9h
293 # CHECK-INST: csrrs t2, mhpmcounter9h, zero
294 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0xb8]
295 # CHECK-INST-ALIAS: csrr t2, mhpmcounter9h
297 csrrs t1
, mhpmcounter9h
, zero
299 csrrs t2
, 0xB89, zero
303 # CHECK-INST: csrrs t1, mhpmcounter10h, zero
304 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0xb8]
305 # CHECK-INST-ALIAS: csrr t1, mhpmcounter10h
307 # CHECK-INST: csrrs t2, mhpmcounter10h, zero
308 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xb8]
309 # CHECK-INST-ALIAS: csrr t2, mhpmcounter10h
311 csrrs t1
, mhpmcounter10h
, zero
313 csrrs t2
, 0xB8A, zero
317 # CHECK-INST: csrrs t1, mhpmcounter11h, zero
318 # CHECK-ENC: encoding: [0x73,0x23,0xb0,0xb8]
319 # CHECK-INST-ALIAS: csrr t1, mhpmcounter11h
321 # CHECK-INST: csrrs t2, mhpmcounter11h, zero
322 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xb8]
323 # CHECK-INST-ALIAS: csrr t2, mhpmcounter11h
325 csrrs t1
, mhpmcounter11h
, zero
327 csrrs t2
, 0xB8B, zero
331 # CHECK-INST: csrrs t1, mhpmcounter12h, zero
332 # CHECK-ENC: encoding: [0x73,0x23,0xc0,0xb8]
333 # CHECK-INST-ALIAS: csrr t1, mhpmcounter12h
335 # CHECK-INST: csrrs t2, mhpmcounter12h, zero
336 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xb8]
337 # CHECK-INST-ALIAS: csrr t2, mhpmcounter12h
339 csrrs t1
, mhpmcounter12h
, zero
341 csrrs t2
, 0xB8C, zero
345 # CHECK-INST: csrrs t1, mhpmcounter13h, zero
346 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0xb8]
347 # CHECK-INST-ALIAS: csrr t1, mhpmcounter13h
349 # CHECK-INST: csrrs t2, mhpmcounter13h, zero
350 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xb8]
351 # CHECK-INST-ALIAS: csrr t2, mhpmcounter13h
353 csrrs t1
, mhpmcounter13h
, zero
355 csrrs t2
, 0xB8D, zero
359 # CHECK-INST: csrrs t1, mhpmcounter14h, zero
360 # CHECK-ENC: encoding: [0x73,0x23,0xe0,0xb8]
361 # CHECK-INST-ALIAS: csrr t1, mhpmcounter14h
363 # CHECK-INST: csrrs t2, mhpmcounter14h, zero
364 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xb8]
365 # CHECK-INST-ALIAS: csrr t2, mhpmcounter14h
367 csrrs t1
, mhpmcounter14h
, zero
369 csrrs t2
, 0xB8E, zero
373 # CHECK-INST: csrrs t1, mhpmcounter15h, zero
374 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0xb8]
375 # CHECK-INST-ALIAS: csrr t1, mhpmcounter15h
377 # CHECK-INST: csrrs t2, mhpmcounter15h, zero
378 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xb8]
379 # CHECK-INST-ALIAS: csrr t2, mhpmcounter15h
381 csrrs t1
, mhpmcounter15h
, zero
383 csrrs t2
, 0xB8F, zero
387 # CHECK-INST: csrrs t1, mhpmcounter16h, zero
388 # CHECK-ENC: encoding: [0x73,0x23,0x00,0xb9]
389 # CHECK-INST-ALIAS: csrr t1, mhpmcounter16h
391 # CHECK-INST: csrrs t2, mhpmcounter16h, zero
392 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xb9]
393 # CHECK-INST-ALIAS: csrr t2, mhpmcounter16h
395 csrrs t1
, mhpmcounter16h
, zero
397 csrrs t2
, 0xB90, zero
401 # CHECK-INST: csrrs t1, mhpmcounter17h, zero
402 # CHECK-ENC: encoding: [0x73,0x23,0x10,0xb9]
403 # CHECK-INST-ALIAS: csrr t1, mhpmcounter17h
405 # CHECK-INST: csrrs t2, mhpmcounter17h, zero
406 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0xb9]
407 # CHECK-INST-ALIAS: csrr t2, mhpmcounter17h
409 csrrs t1
, mhpmcounter17h
, zero
411 csrrs t2
, 0xB91, zero
415 # CHECK-INST: csrrs t1, mhpmcounter18h, zero
416 # CHECK-ENC: encoding: [0x73,0x23,0x20,0xb9]
417 # CHECK-INST-ALIAS: csrr t1, mhpmcounter18h
419 # CHECK-INST: csrrs t2, mhpmcounter18h, zero
420 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xb9]
421 # CHECK-INST-ALIAS: csrr t2, mhpmcounter18h
423 csrrs t1
, mhpmcounter18h
, zero
425 csrrs t2
, 0xB92, zero
429 # CHECK-INST: csrrs t1, mhpmcounter19h, zero
430 # CHECK-ENC: encoding: [0x73,0x23,0x30,0xb9]
431 # CHECK-INST-ALIAS: csrr t1, mhpmcounter19h
433 # CHECK-INST: csrrs t2, mhpmcounter19h, zero
434 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0xb9]
435 # CHECK-INST-ALIAS: csrr t2, mhpmcounter19h
437 csrrs t1
, mhpmcounter19h
, zero
439 csrrs t2
, 0xB93, zero
443 # CHECK-INST: csrrs t1, mhpmcounter20h, zero
444 # CHECK-ENC: encoding: [0x73,0x23,0x40,0xb9]
445 # CHECK-INST-ALIAS: csrr t1, mhpmcounter20h
447 # CHECK-INST: csrrs t2, mhpmcounter20h, zero
448 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0xb9]
449 # CHECK-INST-ALIAS: csrr t2, mhpmcounter20h
451 csrrs t1
, mhpmcounter20h
, zero
453 csrrs t2
, 0xB94, zero
457 # CHECK-INST: csrrs t1, mhpmcounter21h, zero
458 # CHECK-ENC: encoding: [0x73,0x23,0x50,0xb9]
459 # CHECK-INST-ALIAS: csrr t1, mhpmcounter21h
461 # CHECK-INST: csrrs t2, mhpmcounter21h, zero
462 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0xb9]
463 # CHECK-INST-ALIAS: csrr t2, mhpmcounter21h
465 csrrs t1
, mhpmcounter21h
, zero
467 csrrs t2
, 0xB95, zero
471 # CHECK-INST: csrrs t1, mhpmcounter22h, zero
472 # CHECK-ENC: encoding: [0x73,0x23,0x60,0xb9]
473 # CHECK-INST-ALIAS: csrr t1, mhpmcounter22h
475 # CHECK-INST: csrrs t2, mhpmcounter22h, zero
476 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0xb9]
477 # CHECK-INST-ALIAS: csrr t2, mhpmcounter22h
479 csrrs t1
, mhpmcounter22h
, zero
481 csrrs t2
, 0xB96, zero
485 # CHECK-INST: csrrs t1, mhpmcounter23h, zero
486 # CHECK-ENC: encoding: [0x73,0x23,0x70,0xb9]
487 # CHECK-INST-ALIAS: csrr t1, mhpmcounter23h
489 # CHECK-INST: csrrs t2, mhpmcounter23h, zero
490 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0xb9]
491 # CHECK-INST-ALIAS: csrr t2, mhpmcounter23h
493 csrrs t1
, mhpmcounter23h
, zero
495 csrrs t2
, 0xB97, zero
499 # CHECK-INST: csrrs t1, mhpmcounter24h, zero
500 # CHECK-ENC: encoding: [0x73,0x23,0x80,0xb9]
501 # CHECK-INST-ALIAS: csrr t1, mhpmcounter24h
503 # CHECK-INST: csrrs t2, mhpmcounter24h, zero
504 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0xb9]
505 # CHECK-INST-ALIAS: csrr t2, mhpmcounter24h
507 csrrs t1
, mhpmcounter24h
, zero
509 csrrs t2
, 0xB98, zero
513 # CHECK-INST: csrrs t1, mhpmcounter25h, zero
514 # CHECK-ENC: encoding: [0x73,0x23,0x90,0xb9]
515 # CHECK-INST-ALIAS: csrr t1, mhpmcounter25h
517 # CHECK-INST: csrrs t2, mhpmcounter25h, zero
518 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0xb9]
519 # CHECK-INST-ALIAS: csrr t2, mhpmcounter25h
521 csrrs t1
, mhpmcounter25h
, zero
523 csrrs t2
, 0xB99, zero
527 # CHECK-INST: csrrs t1, mhpmcounter26h, zero
528 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0xb9]
529 # CHECK-INST-ALIAS: csrr t1, mhpmcounter26h
531 # CHECK-INST: csrrs t2, mhpmcounter26h, zero
532 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xb9]
533 # CHECK-INST-ALIAS: csrr t2, mhpmcounter26h
535 csrrs t1
, mhpmcounter26h
, zero
537 csrrs t2
, 0xB9A, zero
541 # CHECK-INST: csrrs t1, mhpmcounter27h, zero
542 # CHECK-ENC: encoding: [0x73,0x23,0xb0,0xb9]
543 # CHECK-INST-ALIAS: csrr t1, mhpmcounter27h
545 # CHECK-INST: csrrs t2, mhpmcounter27h, zero
546 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xb9]
547 # CHECK-INST-ALIAS: csrr t2, mhpmcounter27h
549 csrrs t1
, mhpmcounter27h
, zero
551 csrrs t2
, 0xB9B, zero
555 # CHECK-INST: csrrs t1, mhpmcounter28h, zero
556 # CHECK-ENC: encoding: [0x73,0x23,0xc0,0xb9]
557 # CHECK-INST-ALIAS: csrr t1, mhpmcounter28h
559 # CHECK-INST: csrrs t2, mhpmcounter28h, zero
560 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xb9]
561 # CHECK-INST-ALIAS: csrr t2, mhpmcounter28h
563 csrrs t1
, mhpmcounter28h
, zero
565 csrrs t2
, 0xB9C, zero
569 # CHECK-INST: csrrs t1, mhpmcounter29h, zero
570 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0xb9]
571 # CHECK-INST-ALIAS: csrr t1, mhpmcounter29h
573 # CHECK-INST: csrrs t2, mhpmcounter29h, zero
574 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xb9]
575 # CHECK-INST-ALIAS: csrr t2, mhpmcounter29h
577 csrrs t1
, mhpmcounter29h
, zero
579 csrrs t2
, 0xB9D, zero
583 # CHECK-INST: csrrs t1, mhpmcounter30h, zero
584 # CHECK-ENC: encoding: [0x73,0x23,0xe0,0xb9]
585 # CHECK-INST-ALIAS: csrr t1, mhpmcounter30h
587 # CHECK-INST: csrrs t2, mhpmcounter30h, zero
588 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xb9]
589 # CHECK-INST-ALIAS: csrr t2, mhpmcounter30h
591 csrrs t1
, mhpmcounter30h
, zero
593 csrrs t2
, 0xB9E, zero
597 # CHECK-INST: csrrs t1, mhpmcounter31h, zero
598 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0xb9]
599 # CHECK-INST-ALIAS: csrr t1, mhpmcounter31h
601 # CHECK-INST: csrrs t2, mhpmcounter31h, zero
602 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xb9]
603 # CHECK-INST-ALIAS: csrr t2, mhpmcounter31h
605 csrrs t1
, mhpmcounter31h
, zero
607 csrrs t2
, 0xB9F, zero
609 ######################################
610 # Machine Counter Setup
611 ######################################
615 # CHECK-INST: csrrs t1, mhpmevent3h, zero
616 # CHECK-ENC: encoding: [0x73,0x23,0x30,0x72]
617 # CHECK-INST-ALIAS: csrr t1, mhpmevent3h
619 # CHECK-INST: csrrs t2, mhpmevent3h, zero
620 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0x72]
621 # CHECK-INST-ALIAS: csrr t2, mhpmevent3h
623 csrrs t1
, mhpmevent3h
, zero
625 csrrs t2
, 0x723, zero
629 # CHECK-INST: csrrs t1, mhpmevent4h, zero
630 # CHECK-ENC: encoding: [0x73,0x23,0x40,0x72]
631 # CHECK-INST-ALIAS: csrr t1, mhpmevent4h
633 # CHECK-INST: csrrs t2, mhpmevent4h, zero
634 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0x72]
635 # CHECK-INST-ALIAS: csrr t2, mhpmevent4h
637 csrrs t1
, mhpmevent4h
, zero
639 csrrs t2
, 0x724, zero
643 # CHECK-INST: csrrs t1, mhpmevent5h, zero
644 # CHECK-ENC: encoding: [0x73,0x23,0x50,0x72]
645 # CHECK-INST-ALIAS: csrr t1, mhpmevent5h
647 # CHECK-INST: csrrs t2, mhpmevent5h, zero
648 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0x72]
649 # CHECK-INST-ALIAS: csrr t2, mhpmevent5h
651 csrrs t1
, mhpmevent5h
, zero
653 csrrs t2
, 0x725, zero
657 # CHECK-INST: csrrs t1, mhpmevent6h, zero
658 # CHECK-ENC: encoding: [0x73,0x23,0x60,0x72]
659 # CHECK-INST-ALIAS: csrr t1, mhpmevent6h
661 # CHECK-INST: csrrs t2, mhpmevent6h, zero
662 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0x72]
663 # CHECK-INST-ALIAS: csrr t2, mhpmevent6h
665 csrrs t1
, mhpmevent6h
, zero
667 csrrs t2
, 0x726, zero
671 # CHECK-INST: csrrs t1, mhpmevent7h, zero
672 # CHECK-ENC: encoding: [0x73,0x23,0x70,0x72]
673 # CHECK-INST-ALIAS: csrr t1, mhpmevent7h
675 # CHECK-INST: csrrs t2, mhpmevent7h, zero
676 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0x72]
677 # CHECK-INST-ALIAS: csrr t2, mhpmevent7h
679 csrrs t1
, mhpmevent7h
, zero
681 csrrs t2
, 0x727, zero
685 # CHECK-INST: csrrs t1, mhpmevent8h, zero
686 # CHECK-ENC: encoding: [0x73,0x23,0x80,0x72]
687 # CHECK-INST-ALIAS: csrr t1, mhpmevent8h
689 # CHECK-INST: csrrs t2, mhpmevent8h, zero
690 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0x72]
691 # CHECK-INST-ALIAS: csrr t2, mhpmevent8h
693 csrrs t1
, mhpmevent8h
, zero
695 csrrs t2
, 0x728, zero
699 # CHECK-INST: csrrs t1, mhpmevent9h, zero
700 # CHECK-ENC: encoding: [0x73,0x23,0x90,0x72]
701 # CHECK-INST-ALIAS: csrr t1, mhpmevent9h
703 # CHECK-INST: csrrs t2, mhpmevent9h, zero
704 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0x72]
705 # CHECK-INST-ALIAS: csrr t2, mhpmevent9h
707 csrrs t1
, mhpmevent9h
, zero
709 csrrs t2
, 0x729, zero
713 # CHECK-INST: csrrs t1, mhpmevent10h, zero
714 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0x72]
715 # CHECK-INST-ALIAS: csrr t1, mhpmevent10h
717 # CHECK-INST: csrrs t2, mhpmevent10h, zero
718 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0x72]
719 # CHECK-INST-ALIAS: csrr t2, mhpmevent10h
721 csrrs t1
, mhpmevent10h
, zero
723 csrrs t2
, 0x72a, zero
727 # CHECK-INST: csrrs t1, mhpmevent11h, zero
728 # CHECK-ENC: encoding: [0x73,0x23,0xb0,0x72]
729 # CHECK-INST-ALIAS: csrr t1, mhpmevent11h
731 # CHECK-INST: csrrs t2, mhpmevent11h, zero
732 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0x72]
733 # CHECK-INST-ALIAS: csrr t2, mhpmevent11h
735 csrrs t1
, mhpmevent11h
, zero
737 csrrs t2
, 0x72B, zero
741 # CHECK-INST: csrrs t1, mhpmevent12h, zero
742 # CHECK-ENC: encoding: [0x73,0x23,0xc0,0x72]
743 # CHECK-INST-ALIAS: csrr t1, mhpmevent12h
745 # CHECK-INST: csrrs t2, mhpmevent12h, zero
746 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0x72]
747 # CHECK-INST-ALIAS: csrr t2, mhpmevent12h
749 csrrs t1
, mhpmevent12h
, zero
751 csrrs t2
, 0x72C, zero
755 # CHECK-INST: csrrs t1, mhpmevent13h, zero
756 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0x72]
757 # CHECK-INST-ALIAS: csrr t1, mhpmevent13h
759 # CHECK-INST: csrrs t2, mhpmevent13h, zero
760 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0x72]
761 # CHECK-INST-ALIAS: csrr t2, mhpmevent13h
763 csrrs t1
, mhpmevent13h
, zero
765 csrrs t2
, 0x72D, zero
769 # CHECK-INST: csrrs t1, mhpmevent14h, zero
770 # CHECK-ENC: encoding: [0x73,0x23,0xe0,0x72]
771 # CHECK-INST-ALIAS: csrr t1, mhpmevent14h
773 # CHECK-INST: csrrs t2, mhpmevent14h, zero
774 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0x72]
775 # CHECK-INST-ALIAS: csrr t2, mhpmevent14h
777 csrrs t1
, mhpmevent14h
, zero
779 csrrs t2
, 0x72E, zero
783 # CHECK-INST: csrrs t1, mhpmevent15h, zero
784 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0x72]
785 # CHECK-INST-ALIAS: csrr t1, mhpmevent15h
787 # CHECK-INST: csrrs t2, mhpmevent15h, zero
788 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0x72]
789 # CHECK-INST-ALIAS: csrr t2, mhpmevent15h
791 csrrs t1
, mhpmevent15h
, zero
793 csrrs t2
, 0x72F, zero
797 # CHECK-INST: csrrs t1, mhpmevent16h, zero
798 # CHECK-ENC: encoding: [0x73,0x23,0x00,0x73]
799 # CHECK-INST-ALIAS: csrr t1, mhpmevent16h
801 # CHECK-INST: csrrs t2, mhpmevent16h, zero
802 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0x73]
803 # CHECK-INST-ALIAS: csrr t2, mhpmevent16h
805 csrrs t1
, mhpmevent16h
, zero
807 csrrs t2
, 0x730, zero
811 # CHECK-INST: csrrs t1, mhpmevent17h, zero
812 # CHECK-ENC: encoding: [0x73,0x23,0x10,0x73]
813 # CHECK-INST-ALIAS: csrr t1, mhpmevent17h
815 # CHECK-INST: csrrs t2, mhpmevent17h, zero
816 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0x73]
817 # CHECK-INST-ALIAS: csrr t2, mhpmevent17h
819 csrrs t1
, mhpmevent17h
, zero
821 csrrs t2
, 0x731, zero
825 # CHECK-INST: csrrs t1, mhpmevent18h, zero
826 # CHECK-ENC: encoding: [0x73,0x23,0x20,0x73]
827 # CHECK-INST-ALIAS: csrr t1, mhpmevent18h
829 # CHECK-INST: csrrs t2, mhpmevent18h, zero
830 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0x73]
831 # CHECK-INST-ALIAS: csrr t2, mhpmevent18h
833 csrrs t1
, mhpmevent18h
, zero
835 csrrs t2
, 0x732, zero
839 # CHECK-INST: csrrs t1, mhpmevent19h, zero
840 # CHECK-ENC: encoding: [0x73,0x23,0x30,0x73]
841 # CHECK-INST-ALIAS: csrr t1, mhpmevent19h
843 # CHECK-INST: csrrs t2, mhpmevent19h, zero
844 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0x73]
845 # CHECK-INST-ALIAS: csrr t2, mhpmevent19h
847 csrrs t1
, mhpmevent19h
, zero
849 csrrs t2
, 0x733, zero
853 # CHECK-INST: csrrs t1, mhpmevent20h, zero
854 # CHECK-ENC: encoding: [0x73,0x23,0x40,0x73]
855 # CHECK-INST-ALIAS: csrr t1, mhpmevent20h
857 # CHECK-INST: csrrs t2, mhpmevent20h, zero
858 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0x73]
859 # CHECK-INST-ALIAS: csrr t2, mhpmevent20h
861 csrrs t1
, mhpmevent20h
, zero
863 csrrs t2
, 0x734, zero
867 # CHECK-INST: csrrs t1, mhpmevent21h, zero
868 # CHECK-ENC: encoding: [0x73,0x23,0x50,0x73]
869 # CHECK-INST-ALIAS: csrr t1, mhpmevent21h
871 # CHECK-INST: csrrs t2, mhpmevent21h, zero
872 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0x73]
873 # CHECK-INST-ALIAS: csrr t2, mhpmevent21h
875 csrrs t1
, mhpmevent21h
, zero
877 csrrs t2
, 0x735, zero
881 # CHECK-INST: csrrs t1, mhpmevent22h, zero
882 # CHECK-ENC: encoding: [0x73,0x23,0x60,0x73]
883 # CHECK-INST-ALIAS: csrr t1, mhpmevent22h
885 # CHECK-INST: csrrs t2, mhpmevent22h, zero
886 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0x73]
887 # CHECK-INST-ALIAS: csrr t2, mhpmevent22h
889 csrrs t1
, mhpmevent22h
, zero
891 csrrs t2
, 0x736, zero
895 # CHECK-INST: csrrs t1, mhpmevent23h, zero
896 # CHECK-ENC: encoding: [0x73,0x23,0x70,0x73]
897 # CHECK-INST-ALIAS: csrr t1, mhpmevent23h
899 # CHECK-INST: csrrs t2, mhpmevent23h, zero
900 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0x73]
901 # CHECK-INST-ALIAS: csrr t2, mhpmevent23h
903 csrrs t1
, mhpmevent23h
, zero
905 csrrs t2
, 0x737, zero
909 # CHECK-INST: csrrs t1, mhpmevent24h, zero
910 # CHECK-ENC: encoding: [0x73,0x23,0x80,0x73]
911 # CHECK-INST-ALIAS: csrr t1, mhpmevent24h
913 # CHECK-INST: csrrs t2, mhpmevent24h, zero
914 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0x73]
915 # CHECK-INST-ALIAS: csrr t2, mhpmevent24h
917 csrrs t1
, mhpmevent24h
, zero
919 csrrs t2
, 0x738, zero
923 # CHECK-INST: csrrs t1, mhpmevent25h, zero
924 # CHECK-ENC: encoding: [0x73,0x23,0x90,0x73]
925 # CHECK-INST-ALIAS: csrr t1, mhpmevent25h
927 # CHECK-INST: csrrs t2, mhpmevent25h, zero
928 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0x73]
929 # CHECK-INST-ALIAS: csrr t2, mhpmevent25h
931 csrrs t1
, mhpmevent25h
, zero
933 csrrs t2
, 0x739, zero
937 # CHECK-INST: csrrs t1, mhpmevent26h, zero
938 # CHECK-ENC: encoding: [0x73,0x23,0xa0,0x73]
939 # CHECK-INST-ALIAS: csrr t1, mhpmevent26h
941 # CHECK-INST: csrrs t2, mhpmevent26h, zero
942 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0x73]
943 # CHECK-INST-ALIAS: csrr t2, mhpmevent26h
945 csrrs t1
, mhpmevent26h
, zero
947 csrrs t2
, 0x73A, zero
951 # CHECK-INST: csrrs t1, mhpmevent27h, zero
952 # CHECK-ENC: encoding: [0x73,0x23,0xb0,0x73]
953 # CHECK-INST-ALIAS: csrr t1, mhpmevent27h
955 # CHECK-INST: csrrs t2, mhpmevent27h, zero
956 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0x73]
957 # CHECK-INST-ALIAS: csrr t2, mhpmevent27h
959 csrrs t1
, mhpmevent27h
, zero
961 csrrs t2
, 0x73B, zero
965 # CHECK-INST: csrrs t1, mhpmevent28h, zero
966 # CHECK-ENC: encoding: [0x73,0x23,0xc0,0x73]
967 # CHECK-INST-ALIAS: csrr t1, mhpmevent28h
969 # CHECK-INST: csrrs t2, mhpmevent28h, zero
970 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0x73]
971 # CHECK-INST-ALIAS: csrr t2, mhpmevent28h
973 csrrs t1
, mhpmevent28h
, zero
975 csrrs t2
, 0x73C, zero
979 # CHECK-INST: csrrs t1, mhpmevent29h, zero
980 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0x73]
981 # CHECK-INST-ALIAS: csrr t1, mhpmevent29h
983 # CHECK-INST: csrrs t2, mhpmevent29h, zero
984 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0x73]
985 # CHECK-INST-ALIAS: csrr t2, mhpmevent29h
987 csrrs t1
, mhpmevent29h
, zero
989 csrrs t2
, 0x73D, zero
993 # CHECK-INST: csrrs t1, mhpmevent30h, zero
994 # CHECK-ENC: encoding: [0x73,0x23,0xe0,0x73]
995 # CHECK-INST-ALIAS: csrr t1, mhpmevent30h
997 # CHECK-INST: csrrs t2, mhpmevent30h, zero
998 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0x73]
999 # CHECK-INST-ALIAS: csrr t2, mhpmevent30h
1001 csrrs t1
, mhpmevent30h
, zero
1003 csrrs t2
, 0x73E, zero
1007 # CHECK-INST: csrrs t1, mhpmevent31h, zero
1008 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0x73]
1009 # CHECK-INST-ALIAS: csrr t1, mhpmevent31h
1011 # CHECK-INST: csrrs t2, mhpmevent31h, zero
1012 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0x73]
1013 # CHECK-INST-ALIAS: csrr t2, mhpmevent31h
1015 csrrs t1
, mhpmevent31h
, zero
1017 csrrs t2
, 0x73F, zero
1019 #########################################
1020 # State Enable Extension (Smstateen)
1021 #########################################
1025 # CHECK-INST: csrrs t1, mstateen0h, zero
1026 # CHECK-ENC: encoding: [0x73,0x23,0xc0,0x31]
1027 # CHECK-INST-ALIAS: csrr t1, mstateen0h
1029 # CHECK-INST: csrrs t2, mstateen0h, zero
1030 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0x31]
1031 # CHECK-INST-ALIAS: csrr t2, mstateen0h
1033 csrrs t1
, mstateen0h
, zero
1035 csrrs t2
, 0x31C, zero
1039 # CHECK-INST: csrrs t1, mstateen1h, zero
1040 # CHECK-ENC: encoding: [0x73,0x23,0xd0,0x31]
1041 # CHECK-INST-ALIAS: csrr t1, mstateen1h
1043 # CHECK-INST: csrrs t2, mstateen1h, zero
1044 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0x31]
1045 # CHECK-INST-ALIAS: csrr t2, mstateen1h
1047 csrrs t1
, mstateen1h
, zero
1049 csrrs t2
, 0x31D, zero
1053 # CHECK-INST: csrrs t1, mstateen2h, zero
1054 # CHECK-ENC: encoding: [0x73,0x23,0xe0,0x31]
1055 # CHECK-INST-ALIAS: csrr t1, mstateen2h
1057 # CHECK-INST: csrrs t2, mstateen2h, zero
1058 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0x31]
1059 # CHECK-INST-ALIAS: csrr t2, mstateen2h
1061 csrrs t1
, mstateen2h
, zero
1063 csrrs t2
, 0x31E, zero
1067 # CHECK-INST: csrrs t1, mstateen3h, zero
1068 # CHECK-ENC: encoding: [0x73,0x23,0xf0,0x31]
1069 # CHECK-INST-ALIAS: csrr t1, mstateen3h
1071 # CHECK-INST: csrrs t2, mstateen3h, zero
1072 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0x31]
1073 # CHECK-INST-ALIAS: csrr t2, mstateen3h
1075 csrrs t1
, mstateen3h
, zero
1077 csrrs t2
, 0x31F, zero
1079 #########################################
1080 # Advanced Interrupt Architecture (Smaia and Ssaia)
1081 #########################################
1085 # CHECK-INST: csrrs t1, midelegh, zero
1086 # CHECK-ENC: encoding: [0x73,0x23,0x30,0x31]
1087 # CHECK-INST-ALIAS: csrr t1, midelegh
1089 # CHECK-INST: csrrs t2, midelegh, zero
1090 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0x31]
1091 # CHECK-INST-ALIAS: csrr t2, midelegh
1093 csrrs t1
, midelegh
, zero
1095 csrrs t2
, 0x313, zero
1099 # CHECK-INST: csrrs t1, mieh, zero
1100 # CHECK-ENC: encoding: [0x73,0x23,0x40,0x31]
1101 # CHECK-INST-ALIAS: csrr t1, mieh
1103 # CHECK-INST: csrrs t2, mieh, zero
1104 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0x31]
1105 # CHECK-INST-ALIAS: csrr t2, mieh
1107 csrrs t1
, mieh
, zero
1109 csrrs t2
, 0x314, zero
1113 # CHECK-INST: csrrs t1, mvienh, zero
1114 # CHECK-ENC: encoding: [0x73,0x23,0x80,0x31]
1115 # CHECK-INST-ALIAS: csrr t1, mvienh
1117 # CHECK-INST: csrrs t2, mvienh, zero
1118 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0x31]
1119 # CHECK-INST-ALIAS: csrr t2, mvienh
1121 csrrs t1
, mvienh
, zero
1123 csrrs t2
, 0x318, zero
1127 # CHECK-INST: csrrs t1, mviph, zero
1128 # CHECK-ENC: encoding: [0x73,0x23,0x90,0x31]
1129 # CHECK-INST-ALIAS: csrr t1, mviph
1131 # CHECK-INST: csrrs t2, mviph, zero
1132 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0x31]
1133 # CHECK-INST-ALIAS: csrr t2, mviph
1135 csrrs t1
, mviph
, zero
1137 csrrs t2
, 0x319, zero
1141 # CHECK-INST: csrrs t1, miph, zero
1142 # CHECK-ENC: encoding: [0x73,0x23,0x40,0x35]
1143 # CHECK-INST-ALIAS: csrr t1, miph
1145 # CHECK-INST: csrrs t2, miph, zero
1146 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0x35]
1147 # CHECK-INST-ALIAS: csrr t2, miph
1149 csrrs t1
, miph
, zero
1151 csrrs t2
, 0x354, zero