• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
6#
7# RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
8# RUN:     | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
9# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
10# RUN:     | llvm-objdump -d - \
11# RUN:     | FileCheck -check-prefix=CHECK-INST-ALIAS %s
12
13##################################
14# Machine Information Registers
15##################################
16
17# mvendorid
18# name
19# CHECK-INST: csrrs t1, mvendorid, zero
20# CHECK-ENC: encoding: [0x73,0x23,0x10,0xf1]
21# CHECK-INST-ALIAS: csrr t1, mvendorid
22# uimm12
23# CHECK-INST: csrrs t2, mvendorid, zero
24# CHECK-ENC: encoding: [0xf3,0x23,0x10,0xf1]
25# CHECK-INST-ALIAS: csrr t2, mvendorid
26# name
27csrrs t1, mvendorid, zero
28# uimm12
29csrrs t2, 0xF11, zero
30
31# marchid
32# name
33# CHECK-INST: csrrs t1, marchid, zero
34# CHECK-ENC: encoding: [0x73,0x23,0x20,0xf1]
35# CHECK-INST-ALIAS: csrr t1, marchid
36# uimm12
37# CHECK-INST: csrrs t2, marchid, zero
38# CHECK-ENC: encoding: [0xf3,0x23,0x20,0xf1]
39# CHECK-INST-ALIAS: csrr t2, marchid
40# name
41csrrs t1, marchid, zero
42# uimm12
43csrrs t2, 0xF12, zero
44
45# mimpid
46# name
47# CHECK-INST: csrrs t1, mimpid, zero
48# CHECK-ENC: encoding: [0x73,0x23,0x30,0xf1]
49# CHECK-INST-ALIAS: csrr t1, mimpid
50# uimm12
51# CHECK-INST: csrrs t2, mimpid, zero
52# CHECK-ENC: encoding: [0xf3,0x23,0x30,0xf1]
53# CHECK-INST-ALIAS: csrr t2, mimpid
54csrrs t1, mimpid, zero
55# uimm12
56csrrs t2, 0xF13, zero
57
58# mhartid
59# name
60# CHECK-INST: csrrs t1, mhartid, zero
61# CHECK-ENC: encoding: [0x73,0x23,0x40,0xf1]
62# CHECK-INST-ALIAS: csrr t1, mhartid
63# uimm12
64# CHECK-INST: csrrs t2, mhartid, zero
65# CHECK-ENC: encoding: [0xf3,0x23,0x40,0xf1]
66# CHECK-INST-ALIAS: csrr t2, mhartid
67# name
68csrrs t1, mhartid, zero
69# uimm12
70csrrs t2, 0xF14, zero
71
72##################################
73# Machine Trap Setup
74##################################
75
76# mstatus
77# name
78# CHECK-INST: csrrs t1, mstatus, zero
79# CHECK-ENC: encoding: [0x73,0x23,0x00,0x30]
80# CHECK-INST-ALIAS: csrr t1, mstatus
81# uimm12
82# CHECK-INST: csrrs t2, mstatus, zero
83# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x30]
84# CHECK-INST-ALIAS: csrr t2, mstatus
85# name
86csrrs t1, mstatus, zero
87# uimm12
88csrrs t2, 0x300, zero
89
90# misa
91# name
92# CHECK-INST: csrrs t1, misa, zero
93# CHECK-ENC: encoding: [0x73,0x23,0x10,0x30]
94# CHECK-INST-ALIAS: csrr t1, misa
95# uimm12
96# CHECK-INST: csrrs t2, misa, zero
97# CHECK-ENC: encoding: [0xf3,0x23,0x10,0x30]
98# CHECK-INST-ALIAS: csrr t2, misa
99# name
100csrrs t1, misa, zero
101# uimm12
102csrrs t2, 0x301, zero
103
104# medeleg
105# name
106# CHECK-INST: csrrs t1, medeleg, zero
107# CHECK-ENC: encoding: [0x73,0x23,0x20,0x30]
108# CHECK-INST-ALIAS: csrr t1, medeleg
109# uimm12
110# CHECK-INST: csrrs t2, medeleg, zero
111# CHECK-ENC: encoding: [0xf3,0x23,0x20,0x30]
112# CHECK-INST-ALIAS: csrr t2, medeleg
113# name
114csrrs t1, medeleg, zero
115# uimm12
116csrrs t2, 0x302, zero
117# aliases
118
119# mideleg
120# name
121# CHECK-INST: csrrs t1, mideleg, zero
122# CHECK-ENC: encoding: [0x73,0x23,0x30,0x30]
123# CHECK-INST-ALIAS: csrr t1, mideleg
124# uimm12
125# CHECK-INST: csrrs t2, mideleg, zero
126# CHECK-ENC: encoding: [0xf3,0x23,0x30,0x30]
127# CHECK-INST-ALIAS: csrr t2, mideleg
128# aliases
129# name
130csrrs t1, mideleg, zero
131# uimm12
132csrrs t2, 0x303, zero
133
134# mie
135# name
136# CHECK-INST: csrrs t1, mie, zero
137# CHECK-ENC: encoding: [0x73,0x23,0x40,0x30]
138# CHECK-INST-ALIAS: csrr t1, mie
139# uimm12
140# CHECK-INST: csrrs t2, mie, zero
141# CHECK-ENC: encoding: [0xf3,0x23,0x40,0x30]
142# CHECK-INST-ALIAS: csrr t2, mie
143# name
144csrrs t1, mie, zero
145# uimm12
146csrrs t2, 0x304, zero
147
148# mtvec
149# name
150# CHECK-INST: csrrs t1, mtvec, zero
151# CHECK-ENC: encoding: [0x73,0x23,0x50,0x30]
152# CHECK-INST-ALIAS: csrr t1, mtvec
153# uimm12
154# CHECK-INST: csrrs t2, mtvec, zero
155# CHECK-ENC: encoding: [0xf3,0x23,0x50,0x30]
156# CHECK-INST-ALIAS: csrr t2, mtvec
157# name
158csrrs t1, mtvec, zero
159# uimm12
160csrrs t2, 0x305, zero
161
162# mcounteren
163# name
164# CHECK-INST: csrrs t1, mcounteren, zero
165# CHECK-ENC: encoding: [0x73,0x23,0x60,0x30]
166# CHECK-INST-ALIAS: csrr t1, mcounteren
167# uimm12
168# CHECK-INST: csrrs t2, mcounteren, zero
169# CHECK-ENC: encoding: [0xf3,0x23,0x60,0x30]
170# CHECK-INST-ALIAS: csrr t2, mcounteren
171# name
172csrrs t1, mcounteren, zero
173# uimm12
174csrrs t2, 0x306, zero
175
176# mscratch
177# name
178# CHECK-INST: csrrs t1, mscratch, zero
179# CHECK-ENC: encoding: [0x73,0x23,0x00,0x34]
180# CHECK-INST-ALIAS: csrr t1, mscratch
181# uimm12
182# CHECK-INST: csrrs t2, mscratch, zero
183# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x34]
184# CHECK-INST-ALIAS: csrr t2, mscratch
185# name
186csrrs t1, mscratch, zero
187# uimm12
188csrrs t2, 0x340, zero
189
190# mepc
191# name
192# CHECK-INST: csrrs t1, mepc, zero
193# CHECK-ENC: encoding: [0x73,0x23,0x10,0x34]
194# CHECK-INST-ALIAS: csrr t1, mepc
195# uimm12
196# CHECK-INST: csrrs t2, mepc, zero
197# CHECK-ENC: encoding: [0xf3,0x23,0x10,0x34]
198# CHECK-INST-ALIAS: csrr t2, mepc
199# name
200csrrs t1, mepc, zero
201# uimm12
202csrrs t2, 0x341, zero
203
204# mcause
205# name
206# CHECK-INST: csrrs t1, mcause, zero
207# CHECK-ENC: encoding: [0x73,0x23,0x20,0x34]
208# CHECK-INST-ALIAS: csrr t1, mcause
209# uimm12
210# CHECK-INST: csrrs t2, mcause, zero
211# CHECK-ENC: encoding: [0xf3,0x23,0x20,0x34]
212# CHECK-INST-ALIAS: csrr t2, mcause
213# name
214csrrs t1, mcause, zero
215# uimm12
216csrrs t2, 0x342, zero
217
218# mtval
219# name
220# CHECK-INST: csrrs t1, mtval, zero
221# CHECK-ENC: encoding: [0x73,0x23,0x30,0x34]
222# CHECK-INST-ALIAS: csrr t1, mtval
223# uimm12
224# CHECK-INST: csrrs t2, mtval, zero
225# CHECK-ENC: encoding: [0xf3,0x23,0x30,0x34]
226# CHECK-INST-ALIAS: csrr t2, mtval
227# name
228csrrs t1, mtval, zero
229# uimm12
230csrrs t2, 0x343, zero
231
232# mip
233# name
234# CHECK-INST: csrrs t1, mip, zero
235# CHECK-ENC: encoding: [0x73,0x23,0x40,0x34]
236# CHECK-INST-ALIAS: csrr t1, mip
237# uimm12
238# CHECK-INST: csrrs t2, mip, zero
239# CHECK-ENC: encoding: [0xf3,0x23,0x40,0x34]
240# CHECK-INST-ALIAS: csrr t2, mip
241# name
242csrrs t1, mip, zero
243# uimm12
244csrrs t2, 0x344, zero
245
246######################################
247# Machine Protection and Translation
248######################################
249# Tests for pmpcfg1, pmpcfg2 in rv32-machine-csr-names.s
250
251# pmpcfg0
252# name
253# CHECK-INST: csrrs t1, pmpcfg0, zero
254# CHECK-ENC: encoding: [0x73,0x23,0x00,0x3a]
255# CHECK-INST-ALIAS: csrr t1, pmpcfg0
256# uimm12
257# CHECK-INST: csrrs t2, pmpcfg0, zero
258# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x3a]
259# CHECK-INST-ALIAS: csrr t2, pmpcfg0
260# name
261csrrs t1, pmpcfg0, zero
262# uimm12
263csrrs t2, 0x3A0, zero
264
265# pmpcfg2
266# name
267# CHECK-INST: csrrs t1, pmpcfg2, zero
268# CHECK-ENC: encoding: [0x73,0x23,0x20,0x3a]
269# CHECK-INST-ALIAS: csrr t1, pmpcfg2
270# uimm12
271# CHECK-INST: csrrs t2, pmpcfg2, zero
272# CHECK-ENC: encoding: [0xf3,0x23,0x20,0x3a]
273# CHECK-INST-ALIAS: csrr t2, pmpcfg2
274# name
275csrrs t1, pmpcfg2, zero
276# uimm12
277csrrs t2, 0x3A2, zero
278
279
280######################################
281# Machine Counter and Timers
282######################################
283# mcycle
284# name
285# CHECK-INST: csrrs t1, mcycle, zero
286# CHECK-ENC: encoding: [0x73,0x23,0x00,0xb0]
287# CHECK-INST-ALIAS: csrr t1, mcycle
288# uimm12
289# CHECK-INST: csrrs t2, mcycle, zero
290# CHECK-ENC: encoding: [0xf3,0x23,0x00,0xb0]
291# CHECK-INST-ALIAS: csrr t2, mcycle
292csrrs t1, mcycle, zero
293# uimm12
294csrrs t2, 0xB00, zero
295
296# minstret
297# name
298# CHECK-INST: csrrs t1, minstret, zero
299# CHECK-ENC: encoding: [0x73,0x23,0x20,0xb0]
300# CHECK-INST-ALIAS: csrr t1, minstret
301# uimm12
302# CHECK-INST: csrrs t2, minstret, zero
303# CHECK-ENC: encoding: [0xf3,0x23,0x20,0xb0]
304# CHECK-INST-ALIAS: csrr t2, minstret
305# name
306csrrs t1, minstret, zero
307# uimm12
308csrrs t2, 0xB02, zero
309
310
311######################################################
312# Debug and Trace Registers (shared with Debug Mode)
313######################################################
314# tselect
315# name
316# CHECK-INST: csrrs t1, tselect, zero
317# CHECK-ENC: encoding: [0x73,0x23,0x00,0x7a]
318# CHECK-INST-ALIAS: csrr t1, tselect
319# uimm12
320# CHECK-INST: csrrs t2, tselect, zero
321# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x7a]
322# CHECK-INST-ALIAS: csrr t2, tselect
323# name
324csrrs t1, tselect, zero
325# uimm12
326csrrs t2, 0x7A0, zero
327
328# tdata1
329# name
330# CHECK-INST: csrrs t1, tdata1, zero
331# CHECK-ENC: encoding: [0x73,0x23,0x10,0x7a]
332# CHECK-INST-ALIAS: csrr t1, tdata1
333# uimm12
334# CHECK-INST: csrrs t2, tdata1, zero
335# CHECK-ENC: encoding: [0xf3,0x23,0x10,0x7a]
336# CHECK-INST-ALIAS: csrr t2, tdata1
337# name
338csrrs t1, tdata1, zero
339# uimm12
340csrrs t2, 0x7A1, zero
341
342# tdata2
343# name
344# CHECK-INST: csrrs t1, tdata2, zero
345# CHECK-ENC: encoding: [0x73,0x23,0x20,0x7a]
346# CHECK-INST-ALIAS: csrr t1, tdata2
347# uimm12
348# CHECK-INST: csrrs t2, tdata2, zero
349# CHECK-ENC: encoding: [0xf3,0x23,0x20,0x7a]
350# CHECK-INST-ALIAS: csrr t2, tdata2
351csrrs t1, tdata2, zero
352# uimm12
353csrrs t2, 0x7A2, zero
354
355#tdata3
356# name
357# CHECK-INST: csrrs t1, tdata3, zero
358# CHECK-ENC: encoding: [0x73,0x23,0x30,0x7a]
359# CHECK-INST-ALIAS: csrr t1, tdata3
360# uimm12
361# CHECK-INST: csrrs t2, tdata3, zero
362# CHECK-ENC: encoding: [0xf3,0x23,0x30,0x7a]
363# CHECK-INST-ALIAS: csrr t2, tdata3
364# name
365csrrs t1, tdata3, zero
366# uimm12
367csrrs t2, 0x7A3, zero
368
369#######################
370# Debug Mode Registers
371########################
372# dcsr
373# name
374# CHECK-INST: csrrs t1, dcsr, zero
375# CHECK-ENC: encoding: [0x73,0x23,0x00,0x7b]
376# CHECK-INST-ALIAS: csrr t1, dcsr
377# uimm12
378# CHECK-INST: csrrs t2, dcsr, zero
379# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x7b]
380# CHECK-INST-ALIAS: csrr t2, dcsr
381# name
382csrrs t1, dcsr, zero
383# uimm12
384csrrs t2, 0x7B0, zero
385
386# dpc
387# name
388# CHECK-INST: csrrs t1, dpc, zero
389# CHECK-ENC: encoding: [0x73,0x23,0x10,0x7b]
390# CHECK-INST-ALIAS: csrr t1, dpc
391# uimm12
392# CHECK-INST: csrrs t2, dpc, zero
393# CHECK-ENC: encoding: [0xf3,0x23,0x10,0x7b]
394# CHECK-INST-ALIAS: csrr t2, dpc
395# name
396csrrs t1, dpc, zero
397# uimm12
398csrrs t2, 0x7B1, zero
399
400# dscratch0
401# name
402# CHECK-INST: csrrs t1, dscratch0, zero
403# CHECK-ENC: encoding: [0x73,0x23,0x20,0x7b]
404# CHECK-INST-ALIAS: csrr t1, dscratch0
405# uimm12
406# CHECK-INST: csrrs t2, dscratch0, zero
407# CHECK-ENC: encoding: [0xf3,0x23,0x20,0x7b]
408# CHECK-INST-ALIAS: csrr t2, dscratch0
409# name
410csrrs t1, dscratch0, zero
411# uimm12
412csrrs t2, 0x7B2, zero
413
414# dscratch
415# name
416# CHECK-INST: csrrs t1, dscratch0, zero
417# CHECK-ENC: encoding: [0x73,0x23,0x20,0x7b]
418# CHECK-INST-ALIAS: csrr t1, dscratch0
419# uimm12
420# CHECK-INST: csrrs t2, dscratch0, zero
421# CHECK-ENC: encoding: [0xf3,0x23,0x20,0x7b]
422# CHECK-INST-ALIAS: csrr t2, dscratch0
423# name
424csrrs t1, dscratch, zero
425# uimm12
426csrrs t2, 0x7B2, zero
427
428# dscratch1
429# name
430# CHECK-INST: csrrs t1, dscratch1, zero
431# CHECK-ENC: encoding: [0x73,0x23,0x30,0x7b]
432# CHECK-INST-ALIAS: csrr t1, dscratch1
433# uimm12
434# CHECK-INST: csrrs t2, dscratch1, zero
435# CHECK-ENC: encoding: [0xf3,0x23,0x30,0x7b]
436# CHECK-INST-ALIAS: csrr t2, dscratch1
437# name
438csrrs t1, dscratch1, zero
439# uimm12
440csrrs t2, 0x7B3, zero
441
442# mhpmcounter3
443# name
444# CHECK-INST: csrrs t1, mhpmcounter3, zero
445# CHECK-ENC:  encoding: [0x73,0x23,0x30,0xb0]
446# CHECK-INST-ALIAS: csrr t1, mhpmcounter3
447# uimm12
448# CHECK-INST: csrrs t2, mhpmcounter3, zero
449# CHECK-ENC:  encoding: [0xf3,0x23,0x30,0xb0]
450# CHECK-INST-ALIAS: csrr t2, mhpmcounter3
451# name
452csrrs t1, mhpmcounter3, zero
453# uimm12
454csrrs t2, 0xB03, zero
455
456# mhpmcounter4
457# name
458# CHECK-INST: csrrs t1, mhpmcounter4, zero
459# CHECK-ENC:  encoding: [0x73,0x23,0x40,0xb0]
460# CHECK-INST-ALIAS: csrr t1, mhpmcounter4
461# uimm12
462# CHECK-INST: csrrs t2, mhpmcounter4, zero
463# CHECK-ENC:  encoding: [0xf3,0x23,0x40,0xb0]
464# CHECK-INST-ALIAS: csrr t2, mhpmcounter4
465# name
466csrrs t1, mhpmcounter4, zero
467# uimm12
468csrrs t2, 0xB04, zero
469
470# mhpmcounter5
471# name
472# CHECK-INST: csrrs t1, mhpmcounter5, zero
473# CHECK-ENC:  encoding: [0x73,0x23,0x50,0xb0]
474# CHECK-INST-ALIAS: csrr t1, mhpmcounter5
475# uimm12
476# CHECK-INST: csrrs t2, mhpmcounter5, zero
477# CHECK-ENC:  encoding: [0xf3,0x23,0x50,0xb0]
478# CHECK-INST-ALIAS: csrr t2, mhpmcounter5
479# name
480csrrs t1, mhpmcounter5, zero
481# uimm12
482csrrs t2, 0xB05, zero
483
484# mhpmcounter6
485# name
486# CHECK-INST: csrrs t1, mhpmcounter6, zero
487# CHECK-ENC:  encoding: [0x73,0x23,0x60,0xb0]
488# CHECK-INST-ALIAS: csrr t1, mhpmcounter6
489# uimm12
490# CHECK-INST: csrrs t2, mhpmcounter6, zero
491# CHECK-ENC:  encoding: [0xf3,0x23,0x60,0xb0]
492# CHECK-INST-ALIAS: csrr t2, mhpmcounter6
493# name
494csrrs t1, mhpmcounter6, zero
495# uimm12
496csrrs t2, 0xB06, zero
497
498# mhpmcounter7
499# name
500# CHECK-INST: csrrs t1, mhpmcounter7, zero
501# CHECK-ENC:  encoding: [0x73,0x23,0x70,0xb0]
502# CHECK-INST-ALIAS: csrr t1, mhpmcounter7
503# uimm12
504# CHECK-INST: csrrs t2, mhpmcounter7, zero
505# CHECK-ENC:  encoding: [0xf3,0x23,0x70,0xb0]
506# CHECK-INST-ALIAS: csrr t2, mhpmcounter7
507# name
508csrrs t1, mhpmcounter7, zero
509# uimm12
510csrrs t2, 0xB07, zero
511
512# mhpmcounter8
513# name
514# CHECK-INST: csrrs t1, mhpmcounter8, zero
515# CHECK-ENC:  encoding: [0x73,0x23,0x80,0xb0]
516# CHECK-INST-ALIAS: csrr t1, mhpmcounter8
517# uimm12
518# CHECK-INST: csrrs t2, mhpmcounter8, zero
519# CHECK-ENC:  encoding: [0xf3,0x23,0x80,0xb0]
520# CHECK-INST-ALIAS: csrr t2, mhpmcounter8
521# name
522csrrs t1, mhpmcounter8, zero
523# uimm12
524csrrs t2, 0xB08, zero
525
526# mhpmcounter9
527# name
528# CHECK-INST: csrrs t1, mhpmcounter9, zero
529# CHECK-ENC:  encoding: [0x73,0x23,0x90,0xb0]
530# CHECK-INST-ALIAS: csrr t1, mhpmcounter9
531# uimm12
532# CHECK-INST: csrrs t2, mhpmcounter9, zero
533# CHECK-ENC:  encoding: [0xf3,0x23,0x90,0xb0]
534# CHECK-INST-ALIAS: csrr t2, mhpmcounter9
535# name
536csrrs t1, mhpmcounter9, zero
537# uimm12
538csrrs t2, 0xB09, zero
539
540# mhpmcounter10
541# name
542# CHECK-INST: csrrs t1, mhpmcounter10, zero
543# CHECK-ENC:  encoding: [0x73,0x23,0xa0,0xb0]
544# CHECK-INST-ALIAS: csrr t1, mhpmcounter10
545# uimm12
546# CHECK-INST: csrrs t2, mhpmcounter10, zero
547# CHECK-ENC:  encoding: [0xf3,0x23,0xa0,0xb0]
548# CHECK-INST-ALIAS: csrr t2, mhpmcounter10
549# name
550csrrs t1, mhpmcounter10, zero
551# uimm12
552csrrs t2, 0xB0A, zero
553
554# mhpmcounter11
555# name
556# CHECK-INST: csrrs t1, mhpmcounter11, zero
557# CHECK-ENC:  encoding: [0x73,0x23,0xb0,0xb0]
558# CHECK-INST-ALIAS: csrr t1, mhpmcounter11
559# uimm12
560# CHECK-INST: csrrs t2, mhpmcounter11, zero
561# CHECK-ENC:  encoding: [0xf3,0x23,0xb0,0xb0]
562# CHECK-INST-ALIAS: csrr t2, mhpmcounter11
563# name
564csrrs t1, mhpmcounter11, zero
565# uimm12
566csrrs t2, 0xB0B, zero
567
568# mhpmcounter12
569# name
570# CHECK-INST: csrrs t1, mhpmcounter12, zero
571# CHECK-ENC:  encoding: [0x73,0x23,0xc0,0xb0]
572# CHECK-INST-ALIAS: csrr t1, mhpmcounter12
573# uimm12
574# CHECK-INST: csrrs t2, mhpmcounter12, zero
575# CHECK-ENC:  encoding: [0xf3,0x23,0xc0,0xb0]
576# CHECK-INST-ALIAS: csrr t2, mhpmcounter12
577# name
578csrrs t1, mhpmcounter12, zero
579# uimm12
580csrrs t2, 0xB0C, zero
581
582# mhpmcounter13
583# name
584# CHECK-INST: csrrs t1, mhpmcounter13, zero
585# CHECK-ENC:  encoding: [0x73,0x23,0xd0,0xb0]
586# CHECK-INST-ALIAS: csrr t1, mhpmcounter13
587# uimm12
588# CHECK-INST: csrrs t2, mhpmcounter13, zero
589# CHECK-ENC:  encoding: [0xf3,0x23,0xd0,0xb0]
590# CHECK-INST-ALIAS: csrr t2, mhpmcounter13
591# name
592csrrs t1, mhpmcounter13, zero
593# uimm12
594csrrs t2, 0xB0D, zero
595
596# mhpmcounter14
597# name
598# CHECK-INST: csrrs t1, mhpmcounter14, zero
599# CHECK-ENC:  encoding: [0x73,0x23,0xe0,0xb0]
600# CHECK-INST-ALIAS: csrr t1, mhpmcounter14
601# uimm12
602# CHECK-INST: csrrs t2, mhpmcounter14, zero
603# CHECK-ENC:  encoding: [0xf3,0x23,0xe0,0xb0]
604# CHECK-INST-ALIAS: csrr t2, mhpmcounter14
605# name
606csrrs t1, mhpmcounter14, zero
607# uimm12
608csrrs t2, 0xB0E, zero
609
610# mhpmcounter15
611# name
612# CHECK-INST: csrrs t1, mhpmcounter15, zero
613# CHECK-ENC:  encoding: [0x73,0x23,0xf0,0xb0]
614# CHECK-INST-ALIAS: csrr t1, mhpmcounter15
615# uimm12
616# CHECK-INST: csrrs t2, mhpmcounter15, zero
617# CHECK-ENC:  encoding: [0xf3,0x23,0xf0,0xb0]
618# CHECK-INST-ALIAS: csrr t2, mhpmcounter15
619# name
620csrrs t1, mhpmcounter15, zero
621# uimm12
622csrrs t2, 0xB0F, zero
623
624# mhpmcounter16
625# name
626# CHECK-INST: csrrs t1, mhpmcounter16, zero
627# CHECK-ENC:  encoding: [0x73,0x23,0x00,0xb1]
628# CHECK-INST-ALIAS: csrr t1, mhpmcounter16
629# uimm12
630# CHECK-INST: csrrs t2, mhpmcounter16, zero
631# CHECK-ENC:  encoding: [0xf3,0x23,0x00,0xb1]
632# CHECK-INST-ALIAS: csrr t2, mhpmcounter16
633# name
634csrrs t1, mhpmcounter16, zero
635# uimm12
636csrrs t2, 0xB10, zero
637
638# mhpmcounter17
639# name
640# CHECK-INST: csrrs t1, mhpmcounter17, zero
641# CHECK-ENC:  encoding: [0x73,0x23,0x10,0xb1]
642# CHECK-INST-ALIAS: csrr t1, mhpmcounter17
643# uimm12
644# CHECK-INST: csrrs t2, mhpmcounter17, zero
645# CHECK-ENC:  encoding: [0xf3,0x23,0x10,0xb1]
646# CHECK-INST-ALIAS: csrr t2, mhpmcounter17
647# name
648csrrs t1, mhpmcounter17, zero
649# uimm12
650csrrs t2, 0xB11, zero
651
652# mhpmcounter18
653# name
654# CHECK-INST: csrrs t1, mhpmcounter18, zero
655# CHECK-ENC:  encoding: [0x73,0x23,0x20,0xb1]
656# CHECK-INST-ALIAS: csrr t1, mhpmcounter18
657# uimm12
658# CHECK-INST: csrrs t2, mhpmcounter18, zero
659# CHECK-ENC:  encoding: [0xf3,0x23,0x20,0xb1]
660# CHECK-INST-ALIAS: csrr t2, mhpmcounter18
661# name
662csrrs t1, mhpmcounter18, zero
663# uimm12
664csrrs t2, 0xB12, zero
665
666# mhpmcounter19
667# name
668# CHECK-INST: csrrs t1, mhpmcounter19, zero
669# CHECK-ENC:  encoding: [0x73,0x23,0x30,0xb1]
670# CHECK-INST-ALIAS: csrr t1, mhpmcounter19
671# uimm12
672# CHECK-INST: csrrs t2, mhpmcounter19, zero
673# CHECK-ENC:  encoding: [0xf3,0x23,0x30,0xb1]
674# CHECK-INST-ALIAS: csrr t2, mhpmcounter19
675# name
676csrrs t1, mhpmcounter19, zero
677# uimm12
678csrrs t2, 0xB13, zero
679
680# mhpmcounter20
681# name
682# CHECK-INST: csrrs t1, mhpmcounter20, zero
683# CHECK-ENC:  encoding: [0x73,0x23,0x40,0xb1]
684# CHECK-INST-ALIAS: csrr t1, mhpmcounter20
685# uimm12
686# CHECK-INST: csrrs t2, mhpmcounter20, zero
687# CHECK-ENC:  encoding: [0xf3,0x23,0x40,0xb1]
688# CHECK-INST-ALIAS: csrr t2, mhpmcounter20
689# name
690csrrs t1, mhpmcounter20, zero
691# uimm12
692csrrs t2, 0xB14, zero
693
694# mhpmcounter21
695# name
696# CHECK-INST: csrrs t1, mhpmcounter21, zero
697# CHECK-ENC:  encoding: [0x73,0x23,0x50,0xb1]
698# CHECK-INST-ALIAS: csrr t1, mhpmcounter21
699# uimm12
700# CHECK-INST: csrrs t2, mhpmcounter21, zero
701# CHECK-ENC:  encoding: [0xf3,0x23,0x50,0xb1]
702# CHECK-INST-ALIAS: csrr t2, mhpmcounter21
703# name
704csrrs t1, mhpmcounter21, zero
705# uimm12
706csrrs t2, 0xB15, zero
707
708# mhpmcounter22
709# name
710# CHECK-INST: csrrs t1, mhpmcounter22, zero
711# CHECK-ENC:  encoding: [0x73,0x23,0x60,0xb1]
712# CHECK-INST-ALIAS: csrr t1, mhpmcounter22
713# uimm12
714# CHECK-INST: csrrs t2, mhpmcounter22, zero
715# CHECK-ENC:  encoding: [0xf3,0x23,0x60,0xb1]
716# CHECK-INST-ALIAS: csrr t2, mhpmcounter22
717# name
718csrrs t1, mhpmcounter22, zero
719# uimm12
720csrrs t2, 0xB16, zero
721
722# mhpmcounter23
723# name
724# CHECK-INST: csrrs t1, mhpmcounter23, zero
725# CHECK-ENC:  encoding: [0x73,0x23,0x70,0xb1]
726# CHECK-INST-ALIAS: csrr t1, mhpmcounter23
727# uimm12
728# CHECK-INST: csrrs t2, mhpmcounter23, zero
729# CHECK-ENC:  encoding: [0xf3,0x23,0x70,0xb1]
730# CHECK-INST-ALIAS: csrr t2, mhpmcounter23
731# name
732csrrs t1, mhpmcounter23, zero
733# uimm12
734csrrs t2, 0xB17, zero
735
736# mhpmcounter24
737# name
738# CHECK-INST: csrrs t1, mhpmcounter24, zero
739# CHECK-ENC:  encoding: [0x73,0x23,0x80,0xb1]
740# CHECK-INST-ALIAS: csrr t1, mhpmcounter24
741# uimm12
742# CHECK-INST: csrrs t2, mhpmcounter24, zero
743# CHECK-ENC:  encoding: [0xf3,0x23,0x80,0xb1]
744# CHECK-INST-ALIAS: csrr t2, mhpmcounter24
745# name
746csrrs t1, mhpmcounter24, zero
747# uimm12
748csrrs t2, 0xB18, zero
749
750# mhpmcounter25
751# name
752# CHECK-INST: csrrs t1, mhpmcounter25, zero
753# CHECK-ENC:  encoding: [0x73,0x23,0x90,0xb1]
754# CHECK-INST-ALIAS: csrr t1, mhpmcounter25
755# uimm12
756# CHECK-INST: csrrs t2, mhpmcounter25, zero
757# CHECK-ENC:  encoding: [0xf3,0x23,0x90,0xb1]
758# CHECK-INST-ALIAS: csrr t2, mhpmcounter25
759# name
760csrrs t1, mhpmcounter25, zero
761# uimm12
762csrrs t2, 0xB19, zero
763
764# mhpmcounter26
765# name
766# CHECK-INST: csrrs t1, mhpmcounter26, zero
767# CHECK-ENC:  encoding: [0x73,0x23,0xa0,0xb1]
768# CHECK-INST-ALIAS: csrr t1, mhpmcounter26
769# uimm12
770# CHECK-INST: csrrs t2, mhpmcounter26, zero
771# CHECK-ENC:  encoding: [0xf3,0x23,0xa0,0xb1]
772# CHECK-INST-ALIAS: csrr t2, mhpmcounter26
773# name
774csrrs t1, mhpmcounter26, zero
775# uimm12
776csrrs t2, 0xB1A, zero
777
778# mhpmcounter27
779# name
780# CHECK-INST: csrrs t1, mhpmcounter27, zero
781# CHECK-ENC:  encoding: [0x73,0x23,0xb0,0xb1]
782# CHECK-INST-ALIAS: csrr t1, mhpmcounter27
783# uimm12
784# CHECK-INST: csrrs t2, mhpmcounter27, zero
785# CHECK-ENC:  encoding: [0xf3,0x23,0xb0,0xb1]
786# CHECK-INST-ALIAS: csrr t2, mhpmcounter27
787# name
788csrrs t1, mhpmcounter27, zero
789# uimm12
790csrrs t2, 0xB1B, zero
791
792# mhpmcounter28
793# name
794# CHECK-INST: csrrs t1, mhpmcounter28, zero
795# CHECK-ENC:  encoding: [0x73,0x23,0xc0,0xb1]
796# CHECK-INST-ALIAS: csrr t1, mhpmcounter28
797# uimm12
798# CHECK-INST: csrrs t2, mhpmcounter28, zero
799# CHECK-ENC:  encoding: [0xf3,0x23,0xc0,0xb1]
800# CHECK-INST-ALIAS: csrr t2, mhpmcounter28
801# name
802csrrs t1, mhpmcounter28, zero
803# uimm12
804csrrs t2, 0xB1C, zero
805
806# mhpmcounter29
807# name
808# CHECK-INST: csrrs t1, mhpmcounter29, zero
809# CHECK-ENC:  encoding: [0x73,0x23,0xd0,0xb1]
810# CHECK-INST-ALIAS: csrr t1, mhpmcounter29
811# uimm12
812# CHECK-INST: csrrs t2, mhpmcounter29, zero
813# CHECK-ENC:  encoding: [0xf3,0x23,0xd0,0xb1]
814# CHECK-INST-ALIAS: csrr t2, mhpmcounter29
815# name
816csrrs t1, mhpmcounter29, zero
817# uimm12
818csrrs t2, 0xB1D, zero
819
820# mhpmcounter30
821# name
822# CHECK-INST: csrrs t1, mhpmcounter30, zero
823# CHECK-ENC:  encoding: [0x73,0x23,0xe0,0xb1]
824# CHECK-INST-ALIAS: csrr t1, mhpmcounter30
825# uimm12
826# CHECK-INST: csrrs t2, mhpmcounter30, zero
827# CHECK-ENC:  encoding: [0xf3,0x23,0xe0,0xb1]
828# CHECK-INST-ALIAS: csrr t2, mhpmcounter30
829# name
830csrrs t1, mhpmcounter30, zero
831# uimm12
832csrrs t2, 0xB1E, zero
833
834# mhpmcounter31
835# name
836# CHECK-INST: csrrs t1, mhpmcounter31, zero
837# CHECK-ENC:  encoding: [0x73,0x23,0xf0,0xb1]
838# CHECK-INST-ALIAS: csrr t1, mhpmcounter31
839# uimm12
840# CHECK-INST: csrrs t2, mhpmcounter31, zero
841# CHECK-ENC:  encoding: [0xf3,0x23,0xf0,0xb1]
842# CHECK-INST-ALIAS: csrr t2, mhpmcounter31
843# name
844csrrs t1, mhpmcounter31, zero
845# uimm12
846csrrs t2, 0xB1F, zero
847
848
849######################################
850# Machine Counter Setup
851######################################
852# mcountinhibit
853# name
854# CHECK-INST: csrrs t1, mcountinhibit, zero
855# CHECK-ENC:  encoding: [0x73,0x23,0x00,0x32]
856# CHECK-INST-ALIAS: csrr t1, mcountinhibit
857# uimm12
858# CHECK-INST: csrrs t2, mcountinhibit, zero
859# CHECK-ENC:  encoding: [0xf3,0x23,0x00,0x32]
860# CHECK-INST-ALIAS: csrr t2, mcountinhibit
861# name
862csrrs t1, mcountinhibit, zero
863# uimm12
864csrrs t2, 0x320, zero
865
866# mucounteren
867# name
868# CHECK-INST: csrrs t1, mcountinhibit, zero
869# CHECK-ENC:  encoding: [0x73,0x23,0x00,0x32]
870# CHECK-INST-ALIAS: csrr t1, mcountinhibit
871# uimm12
872# CHECK-INST: csrrs t2, mcountinhibit, zero
873# CHECK-ENC:  encoding: [0xf3,0x23,0x00,0x32]
874# CHECK-INST-ALIAS: csrr t2, mcountinhibit
875# name
876csrrs t1, mucounteren, zero
877# uimm12
878csrrs t2, 0x320, zero
879
880# mhpmevent3
881# name
882# CHECK-INST: csrrs t1, mhpmevent3, zero
883# CHECK-ENC:  encoding: [0x73,0x23,0x30,0x32]
884# CHECK-INST-ALIAS: csrr t1, mhpmevent3
885# uimm12
886# CHECK-INST: csrrs t2, mhpmevent3, zero
887# CHECK-ENC:  encoding: [0xf3,0x23,0x30,0x32]
888# CHECK-INST-ALIAS: csrr t2, mhpmevent3
889# name
890csrrs t1, mhpmevent3, zero
891# uimm12
892csrrs t2, 0x323, zero
893
894# mhpmevent4
895# name
896# CHECK-INST: csrrs t1, mhpmevent4, zero
897# CHECK-ENC:  encoding: [0x73,0x23,0x40,0x32]
898# CHECK-INST-ALIAS: csrr t1, mhpmevent4
899# uimm12
900# CHECK-INST: csrrs t2, mhpmevent4, zero
901# CHECK-ENC:  encoding: [0xf3,0x23,0x40,0x32]
902# CHECK-INST-ALIAS: csrr t2, mhpmevent4
903# name
904csrrs t1, mhpmevent4, zero
905# uimm12
906csrrs t2, 0x324, zero
907
908# mhpmevent5
909# name
910# CHECK-INST: csrrs t1, mhpmevent5, zero
911# CHECK-ENC:  encoding: [0x73,0x23,0x50,0x32]
912# CHECK-INST-ALIAS: csrr t1, mhpmevent5
913# uimm12
914# CHECK-INST: csrrs t2, mhpmevent5, zero
915# CHECK-ENC:  encoding: [0xf3,0x23,0x50,0x32]
916# CHECK-INST-ALIAS: csrr t2, mhpmevent5
917# name
918csrrs t1, mhpmevent5, zero
919# uimm12
920csrrs t2, 0x325, zero
921
922# mhpmevent6
923# name
924# CHECK-INST: csrrs t1, mhpmevent6, zero
925# CHECK-ENC:  encoding: [0x73,0x23,0x60,0x32]
926# CHECK-INST-ALIAS: csrr t1, mhpmevent6
927# uimm12
928# CHECK-INST: csrrs t2, mhpmevent6, zero
929# CHECK-ENC:  encoding: [0xf3,0x23,0x60,0x32]
930# CHECK-INST-ALIAS: csrr t2, mhpmevent6
931# name
932csrrs t1, mhpmevent6, zero
933# uimm12
934csrrs t2, 0x326, zero
935
936# mhpmevent7
937# name
938# CHECK-INST: csrrs t1, mhpmevent7, zero
939# CHECK-ENC:  encoding: [0x73,0x23,0x70,0x32]
940# CHECK-INST-ALIAS: csrr t1, mhpmevent7
941# uimm12
942# CHECK-INST: csrrs t2, mhpmevent7, zero
943# CHECK-ENC:  encoding: [0xf3,0x23,0x70,0x32]
944# CHECK-INST-ALIAS: csrr t2, mhpmevent7
945# name
946csrrs t1, mhpmevent7, zero
947# uimm12
948csrrs t2, 0x327, zero
949
950# mhpmevent8
951# name
952# CHECK-INST: csrrs t1, mhpmevent8, zero
953# CHECK-ENC:  encoding: [0x73,0x23,0x80,0x32]
954# CHECK-INST-ALIAS: csrr t1, mhpmevent8
955# uimm12
956# CHECK-INST: csrrs t2, mhpmevent8, zero
957# CHECK-ENC:  encoding: [0xf3,0x23,0x80,0x32]
958# CHECK-INST-ALIAS: csrr t2, mhpmevent8
959# name
960csrrs t1, mhpmevent8, zero
961# uimm12
962csrrs t2, 0x328, zero
963
964# mhpmevent9
965# name
966# CHECK-INST: csrrs t1, mhpmevent9, zero
967# CHECK-ENC:  encoding: [0x73,0x23,0x90,0x32]
968# CHECK-INST-ALIAS: csrr t1, mhpmevent9
969# uimm12
970# CHECK-INST: csrrs t2, mhpmevent9, zero
971# CHECK-ENC:  encoding: [0xf3,0x23,0x90,0x32]
972# CHECK-INST-ALIAS: csrr t2, mhpmevent9
973# name
974csrrs t1, mhpmevent9, zero
975# uimm12
976csrrs t2, 0x329, zero
977
978# mhpmevent10
979# name
980# CHECK-INST: csrrs t1, mhpmevent10, zero
981# CHECK-ENC:  encoding: [0x73,0x23,0xa0,0x32]
982# CHECK-INST-ALIAS: csrr t1, mhpmevent10
983# uimm12
984# CHECK-INST: csrrs t2, mhpmevent10, zero
985# CHECK-ENC:  encoding: [0xf3,0x23,0xa0,0x32]
986# CHECK-INST-ALIAS: csrr t2, mhpmevent10
987# name
988csrrs t1, mhpmevent10, zero
989# uimm12
990csrrs t2, 0x32A, zero
991
992# mhpmevent11
993# name
994# CHECK-INST: csrrs t1, mhpmevent11, zero
995# CHECK-ENC:  encoding: [0x73,0x23,0xb0,0x32]
996# CHECK-INST-ALIAS: csrr t1, mhpmevent11
997# uimm12
998# CHECK-INST: csrrs t2, mhpmevent11, zero
999# CHECK-ENC:  encoding: [0xf3,0x23,0xb0,0x32]
1000# CHECK-INST-ALIAS: csrr t2, mhpmevent11
1001# name
1002csrrs t1, mhpmevent11, zero
1003# uimm12
1004csrrs t2, 0x32B, zero
1005
1006# mhpmevent12
1007# name
1008# CHECK-INST: csrrs t1, mhpmevent12, zero
1009# CHECK-ENC:  encoding: [0x73,0x23,0xc0,0x32]
1010# CHECK-INST-ALIAS: csrr t1, mhpmevent12
1011# uimm12
1012# CHECK-INST: csrrs t2, mhpmevent12, zero
1013# CHECK-ENC:  encoding: [0xf3,0x23,0xc0,0x32]
1014# CHECK-INST-ALIAS: csrr t2, mhpmevent12
1015# name
1016csrrs t1, mhpmevent12, zero
1017# uimm12
1018csrrs t2, 0x32C, zero
1019
1020# mhpmevent13
1021# name
1022# CHECK-INST: csrrs t1, mhpmevent13, zero
1023# CHECK-ENC:  encoding: [0x73,0x23,0xd0,0x32]
1024# CHECK-INST-ALIAS: csrr t1, mhpmevent13
1025# uimm12
1026# CHECK-INST: csrrs t2, mhpmevent13, zero
1027# CHECK-ENC:  encoding: [0xf3,0x23,0xd0,0x32]
1028# CHECK-INST-ALIAS: csrr t2, mhpmevent13
1029# name
1030csrrs t1, mhpmevent13, zero
1031# uimm12
1032csrrs t2, 0x32D, zero
1033
1034# mhpmevent14
1035# name
1036# CHECK-INST: csrrs t1, mhpmevent14, zero
1037# CHECK-ENC:  encoding: [0x73,0x23,0xe0,0x32]
1038# CHECK-INST-ALIAS: csrr t1, mhpmevent14
1039# uimm12
1040
1041# CHECK-INST: csrrs t2, mhpmevent14, zero
1042# CHECK-ENC:  encoding: [0xf3,0x23,0xe0,0x32]
1043# CHECK-INST-ALIAS: csrr t2, mhpmevent14
1044# name
1045csrrs t1, mhpmevent14, zero
1046# uimm12
1047csrrs t2, 0x32E, zero
1048
1049# mhpmevent15
1050# name
1051# CHECK-INST: csrrs t1, mhpmevent15, zero
1052# CHECK-ENC:  encoding: [0x73,0x23,0xf0,0x32]
1053# CHECK-INST-ALIAS: csrr t1, mhpmevent15
1054# uimm12
1055# CHECK-INST: csrrs t2, mhpmevent15, zero
1056# CHECK-ENC:  encoding: [0xf3,0x23,0xf0,0x32]
1057# CHECK-INST-ALIAS: csrr t2, mhpmevent15
1058# name
1059csrrs t1, mhpmevent15, zero
1060# uimm12
1061csrrs t2, 0x32F, zero
1062
1063# mhpmevent16
1064# name
1065# CHECK-INST: csrrs t1, mhpmevent16, zero
1066# CHECK-ENC:  encoding: [0x73,0x23,0x00,0x33]
1067# CHECK-INST-ALIAS: csrr t1, mhpmevent16
1068# uimm12
1069# CHECK-INST: csrrs t2, mhpmevent16, zero
1070# CHECK-ENC:  encoding: [0xf3,0x23,0x00,0x33]
1071# CHECK-INST-ALIAS: csrr t2, mhpmevent16
1072# name
1073csrrs t1, mhpmevent16, zero
1074# uimm12
1075csrrs t2, 0x330, zero
1076
1077# mhpmevent17
1078# name
1079# CHECK-INST: csrrs t1, mhpmevent17, zero
1080# CHECK-ENC:  encoding: [0x73,0x23,0x10,0x33]
1081# CHECK-INST-ALIAS: csrr t1, mhpmevent17
1082# uimm12
1083# CHECK-INST: csrrs t2, mhpmevent17, zero
1084# CHECK-ENC:  encoding: [0xf3,0x23,0x10,0x33]
1085# CHECK-INST-ALIAS: csrr t2, mhpmevent17
1086# name
1087csrrs t1, mhpmevent17, zero
1088# uimm12
1089csrrs t2, 0x331, zero
1090
1091# mhpmevent18
1092# name
1093# CHECK-INST: csrrs t1, mhpmevent18, zero
1094# CHECK-ENC:  encoding: [0x73,0x23,0x20,0x33]
1095# CHECK-INST-ALIAS: csrr t1, mhpmevent18
1096# uimm12
1097# CHECK-INST: csrrs t2, mhpmevent18, zero
1098# CHECK-ENC:  encoding: [0xf3,0x23,0x20,0x33]
1099# CHECK-INST-ALIAS: csrr t2, mhpmevent18
1100# name
1101csrrs t1, mhpmevent18, zero
1102# uimm12
1103csrrs t2, 0x332, zero
1104
1105# mhpmevent19
1106# name
1107# CHECK-INST: csrrs t1, mhpmevent19, zero
1108# CHECK-ENC:  encoding: [0x73,0x23,0x30,0x33]
1109# CHECK-INST-ALIAS: csrr t1, mhpmevent19
1110# uimm12
1111# CHECK-INST: csrrs t2, mhpmevent19, zero
1112# CHECK-ENC:  encoding: [0xf3,0x23,0x30,0x33]
1113# CHECK-INST-ALIAS: csrr t2, mhpmevent19
1114# name
1115csrrs t1, mhpmevent19, zero
1116# uimm12
1117csrrs t2, 0x333, zero
1118
1119# mhpmevent20
1120# name
1121# CHECK-INST: csrrs t1, mhpmevent20, zero
1122# CHECK-ENC:  encoding: [0x73,0x23,0x40,0x33]
1123# CHECK-INST-ALIAS: csrr t1, mhpmevent20
1124# uimm12
1125# CHECK-INST: csrrs t2, mhpmevent20, zero
1126# CHECK-ENC:  encoding: [0xf3,0x23,0x40,0x33]
1127# CHECK-INST-ALIAS: csrr t2, mhpmevent20
1128# name
1129csrrs t1, mhpmevent20, zero
1130# uimm12
1131csrrs t2, 0x334, zero
1132
1133# mhpmevent21
1134# name
1135# CHECK-INST: csrrs t1, mhpmevent21, zero
1136# CHECK-ENC:  encoding: [0x73,0x23,0x50,0x33]
1137# CHECK-INST-ALIAS: csrr t1, mhpmevent21
1138# uimm12
1139# CHECK-INST: csrrs t2, mhpmevent21, zero
1140# CHECK-ENC:  encoding: [0xf3,0x23,0x50,0x33]
1141# CHECK-INST-ALIAS: csrr t2, mhpmevent21
1142# name
1143csrrs t1, mhpmevent21, zero
1144# uimm12
1145csrrs t2, 0x335, zero
1146
1147# mhpmevent22
1148# name
1149# CHECK-INST: csrrs t1, mhpmevent22, zero
1150# CHECK-ENC:  encoding: [0x73,0x23,0x60,0x33]
1151# CHECK-INST-ALIAS: csrr t1, mhpmevent22
1152# uimm12
1153# CHECK-INST: csrrs t2, mhpmevent22, zero
1154# CHECK-ENC:  encoding: [0xf3,0x23,0x60,0x33]
1155# CHECK-INST-ALIAS: csrr t2, mhpmevent22
1156# name
1157csrrs t1, mhpmevent22, zero
1158# uimm12
1159csrrs t2, 0x336, zero
1160
1161# mhpmevent23
1162# name
1163# CHECK-INST: csrrs t1, mhpmevent23, zero
1164# CHECK-ENC:  encoding: [0x73,0x23,0x70,0x33]
1165# CHECK-INST-ALIAS: csrr t1, mhpmevent23
1166# uimm12
1167# CHECK-INST: csrrs t2, mhpmevent23, zero
1168# CHECK-ENC:  encoding: [0xf3,0x23,0x70,0x33]
1169# CHECK-INST-ALIAS: csrr t2, mhpmevent23
1170# name
1171csrrs t1, mhpmevent23, zero
1172# uimm12
1173csrrs t2, 0x337, zero
1174
1175# mhpmevent24
1176# name
1177# CHECK-INST: csrrs t1, mhpmevent24, zero
1178# CHECK-ENC:  encoding: [0x73,0x23,0x80,0x33]
1179# CHECK-INST-ALIAS: csrr t1, mhpmevent24
1180# uimm12
1181# CHECK-INST: csrrs t2, mhpmevent24, zero
1182# CHECK-ENC:  encoding: [0xf3,0x23,0x80,0x33]
1183# CHECK-INST-ALIAS: csrr t2, mhpmevent24
1184# name
1185csrrs t1, mhpmevent24, zero
1186# uimm12
1187csrrs t2, 0x338, zero
1188
1189# mhpmevent25
1190# name
1191# CHECK-INST: csrrs t1, mhpmevent25, zero
1192# CHECK-ENC:  encoding: [0x73,0x23,0x90,0x33]
1193# CHECK-INST-ALIAS: csrr t1, mhpmevent25
1194# uimm12
1195# CHECK-INST: csrrs t2, mhpmevent25, zero
1196# CHECK-ENC:  encoding: [0xf3,0x23,0x90,0x33]
1197# CHECK-INST-ALIAS: csrr t2, mhpmevent25
1198# name
1199csrrs t1, mhpmevent25, zero
1200# uimm12
1201csrrs t2, 0x339, zero
1202
1203# mhpmevent26
1204# name
1205# CHECK-INST: csrrs t1, mhpmevent26, zero
1206# CHECK-ENC:  encoding: [0x73,0x23,0xa0,0x33]
1207# CHECK-INST-ALIAS: csrr t1, mhpmevent26
1208# uimm12
1209# CHECK-INST: csrrs t2, mhpmevent26, zero
1210# CHECK-ENC:  encoding: [0xf3,0x23,0xa0,0x33]
1211# CHECK-INST-ALIAS: csrr t2, mhpmevent26
1212# name
1213csrrs t1, mhpmevent26, zero
1214# uimm12
1215csrrs t2, 0x33A, zero
1216
1217# mhpmevent27
1218# name
1219# CHECK-INST: csrrs t1, mhpmevent27, zero
1220# CHECK-ENC:  encoding: [0x73,0x23,0xb0,0x33]
1221# CHECK-INST-ALIAS: csrr t1, mhpmevent27
1222# uimm12
1223# CHECK-INST: csrrs t2, mhpmevent27, zero
1224# CHECK-ENC:  encoding: [0xf3,0x23,0xb0,0x33]
1225# CHECK-INST-ALIAS: csrr t2, mhpmevent27
1226# name
1227csrrs t1, mhpmevent27, zero
1228# uimm12
1229csrrs t2, 0x33B, zero
1230
1231# mhpmevent28
1232# name
1233# CHECK-INST: csrrs t1, mhpmevent28, zero
1234# CHECK-ENC:  encoding: [0x73,0x23,0xc0,0x33]
1235# CHECK-INST-ALIAS: csrr t1, mhpmevent28
1236# uimm12
1237# CHECK-INST: csrrs t2, mhpmevent28, zero
1238# CHECK-ENC:  encoding: [0xf3,0x23,0xc0,0x33]
1239# CHECK-INST-ALIAS: csrr t2, mhpmevent28
1240# name
1241csrrs t1, mhpmevent28, zero
1242# uimm12
1243csrrs t2, 0x33C, zero
1244
1245# mhpmevent29
1246# name
1247# CHECK-INST: csrrs t1, mhpmevent29, zero
1248# CHECK-ENC:  encoding: [0x73,0x23,0xd0,0x33]
1249# CHECK-INST-ALIAS: csrr t1, mhpmevent29
1250# uimm12
1251# CHECK-INST: csrrs t2, mhpmevent29, zero
1252# CHECK-ENC:  encoding: [0xf3,0x23,0xd0,0x33]
1253# CHECK-INST-ALIAS: csrr t2, mhpmevent29
1254# name
1255csrrs t1, mhpmevent29, zero
1256# uimm12
1257csrrs t2, 0x33D, zero
1258
1259# mhpmevent30
1260# name
1261# CHECK-INST: csrrs t1, mhpmevent30, zero
1262# CHECK-ENC:  encoding: [0x73,0x23,0xe0,0x33]
1263# CHECK-INST-ALIAS: csrr t1, mhpmevent30
1264# uimm12
1265# CHECK-INST: csrrs t2, mhpmevent30, zero
1266# CHECK-ENC:  encoding: [0xf3,0x23,0xe0,0x33]
1267# CHECK-INST-ALIAS: csrr t2, mhpmevent30
1268# name
1269csrrs t1, mhpmevent30, zero
1270# uimm12
1271csrrs t2, 0x33E, zero
1272
1273# mhpmevent31
1274# name
1275# CHECK-INST: csrrs t1, mhpmevent31, zero
1276# CHECK-ENC:  encoding: [0x73,0x23,0xf0,0x33]
1277# CHECK-INST-ALIAS: csrr t1, mhpmevent31
1278# uimm12
1279# CHECK-INST: csrrs t2, mhpmevent31, zero
1280# CHECK-ENC:  encoding: [0xf3,0x23,0xf0,0x33]
1281# CHECK-INST-ALIAS: csrr t2, mhpmevent31
1282# name
1283csrrs t1, mhpmevent31, zero
1284# uimm12
1285csrrs t2, 0x33F, zero
1286