[obj2yaml] - Fix a comment. NFC.
[llvm-complete.git] / test / MC / RISCV / rv64-machine-csr-names.s
blobbf0d1b688985aa5e202cbbf6caa39956b30e05ba
1 # RUN: llvm-mc %s -triple=riscv64 -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-INST,CHECK-ENC %s
3 # RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
4 # RUN: | llvm-objdump -d - \
5 # RUN: | FileCheck -check-prefix=CHECK-INST-ALIAS %s
7 # These machine mode CSR register names are RV32 only, but RV64
8 # can encode and disassemble these registers if given their value.
10 ######################################
11 # Machine Protection and Translation
12 ######################################
14 # pmpcfg1
15 # uimm12
16 # CHECK-INST: csrrs t2, 929, zero
17 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0x3a]
18 # CHECK-INST-ALIAS: csrr t2, 929
19 csrrs t2, 0x3A1, zero
21 # pmpcfg3
22 # uimm12
23 # CHECK-INST: csrrs t2, 931, zero
24 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0x3a]
25 # CHECK-INST-ALIAS: csrr t2, 931
26 csrrs t2, 0x3A3, zero
28 ######################################
29 # Machine Counter and Timers
30 ######################################
31 # mcycleh
32 # uimm12
33 # CHECK-INST: csrrs t2, 2944, zero
34 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xb8]
35 # CHECK-INST-ALIAS: csrr t2, 2944
36 csrrs t2, 0xB80, zero
38 # minstreth
39 # uimm12
40 # CHECK-INST: csrrs t2, 2946, zero
41 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xb8]
42 # CHECK-INST-ALIAS: csrr t2, 2946
43 csrrs t2, 0xB82, zero
45 # mhpmcounter3h
46 # uimm12
47 # CHECK-INST: csrrs t2, 2947, zero
48 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0xb8]
49 # CHECK-INST-ALIAS: csrr t2, 2947
50 csrrs t2, 0xB83, zero
52 # mhpmcounter4h
53 # uimm12
54 # CHECK-INST: csrrs t2, 2948, zero
55 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0xb8]
56 # CHECK-INST-ALIAS: csrr t2, 2948
57 csrrs t2, 0xB84, zero
59 # mhpmcounter5h
60 # uimm12
61 # CHECK-INST: csrrs t2, 2949, zero
62 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0xb8]
63 # CHECK-INST-ALIAS: csrr t2, 2949
64 csrrs t2, 0xB85, zero
66 # mhpmcounter6h
67 # uimm12
68 # CHECK-INST: csrrs t2, 2950, zero
69 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0xb8]
70 # CHECK-INST-ALIAS: csrr t2, 2950
71 csrrs t2, 0xB86, zero
73 # mhpmcounter7h
74 # uimm12
75 # CHECK-INST: csrrs t2, 2951, zero
76 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0xb8]
77 # CHECK-INST-ALIAS: csrr t2, 2951
78 csrrs t2, 0xB87, zero
80 # mhpmcounter8h
81 # uimm12
82 # CHECK-INST: csrrs t2, 2952, zero
83 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0xb8]
84 # CHECK-INST-ALIAS: csrr t2, 2952
85 csrrs t2, 0xB88, zero
87 # mhpmcounter9h
88 # uimm12
89 # CHECK-INST: csrrs t2, 2953, zero
90 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0xb8]
91 # CHECK-INST-ALIAS: csrr t2, 2953
92 csrrs t2, 0xB89, zero
94 # mhpmcounter10h
95 # uimm12
96 # CHECK-INST: csrrs t2, 2954, zero
97 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xb8]
98 # CHECK-INST-ALIAS: csrr t2, 2954
99 csrrs t2, 0xB8A, zero
101 # mhpmcounter11h
102 # uimm12
103 # CHECK-INST: csrrs t2, 2955, zero
104 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xb8]
105 # CHECK-INST-ALIAS: csrr t2, 2955
106 csrrs t2, 0xB8B, zero
108 # mhpmcounter12h
109 # uimm12
110 # CHECK-INST: csrrs t2, 2956, zero
111 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xb8]
112 # CHECK-INST-ALIAS: csrr t2, 2956
113 csrrs t2, 0xB8C, zero
115 # mhpmcounter13h
116 # uimm12
117 # CHECK-INST: csrrs t2, 2957, zero
118 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xb8]
119 # CHECK-INST-ALIAS: csrr t2, 2957
120 csrrs t2, 0xB8D, zero
122 # mhpmcounter14h
123 # uimm12
124 # CHECK-INST: csrrs t2, 2958, zero
125 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xb8]
126 # CHECK-INST-ALIAS: csrr t2, 2958
127 csrrs t2, 0xB8E, zero
129 # mhpmcounter15h
130 # uimm12
131 # CHECK-INST: csrrs t2, 2959, zero
132 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xb8]
133 # CHECK-INST-ALIAS: csrr t2, 2959
134 csrrs t2, 0xB8F, zero
136 # mhpmcounter16h
137 # uimm12
138 # CHECK-INST: csrrs t2, 2960, zero
139 # CHECK-ENC: encoding: [0xf3,0x23,0x00,0xb9]
140 # CHECK-INST-ALIAS: csrr t2, 2960
141 csrrs t2, 0xB90, zero
143 # mhpmcounter17h
144 # uimm12
145 # CHECK-INST: csrrs t2, 2961, zero
146 # CHECK-ENC: encoding: [0xf3,0x23,0x10,0xb9]
147 # CHECK-INST-ALIAS: csrr t2, 2961
148 csrrs t2, 0xB91, zero
150 # mhpmcounter18h
151 # uimm12
152 # CHECK-INST: csrrs t2, 2962, zero
153 # CHECK-ENC: encoding: [0xf3,0x23,0x20,0xb9]
154 # CHECK-INST-ALIAS: csrr t2, 2962
155 csrrs t2, 0xB92, zero
157 # mhpmcounter19h
158 # uimm12
159 # CHECK-INST: csrrs t2, 2963, zero
160 # CHECK-ENC: encoding: [0xf3,0x23,0x30,0xb9]
161 # CHECK-INST-ALIAS: csrr t2, 2963
162 csrrs t2, 0xB93, zero
164 # mhpmcounter20h
165 # uimm12
166 # CHECK-INST: csrrs t2, 2964, zero
167 # CHECK-ENC: encoding: [0xf3,0x23,0x40,0xb9]
168 # CHECK-INST-ALIAS: csrr t2, 2964
169 csrrs t2, 0xB94, zero
171 # mhpmcounter21h
172 # uimm12
173 # CHECK-INST: csrrs t2, 2965, zero
174 # CHECK-ENC: encoding: [0xf3,0x23,0x50,0xb9]
175 # CHECK-INST-ALIAS: csrr t2, 2965
176 csrrs t2, 0xB95, zero
178 # mhpmcounter22h
179 # uimm12
180 # CHECK-INST: csrrs t2, 2966, zero
181 # CHECK-ENC: encoding: [0xf3,0x23,0x60,0xb9]
182 # CHECK-INST-ALIAS: csrr t2, 2966
183 csrrs t2, 0xB96, zero
185 # mhpmcounter23h
186 # uimm12
187 # CHECK-INST: csrrs t2, 2967, zero
188 # CHECK-ENC: encoding: [0xf3,0x23,0x70,0xb9]
189 # CHECK-INST-ALIAS: csrr t2, 2967
190 csrrs t2, 0xB97, zero
192 # mhpmcounter24h
193 # uimm12
194 # CHECK-INST: csrrs t2, 2968, zero
195 # CHECK-ENC: encoding: [0xf3,0x23,0x80,0xb9]
196 # CHECK-INST-ALIAS: csrr t2, 2968
197 csrrs t2, 0xB98, zero
199 # mhpmcounter25h
200 # uimm12
201 # CHECK-INST: csrrs t2, 2969, zero
202 # CHECK-ENC: encoding: [0xf3,0x23,0x90,0xb9]
203 # CHECK-INST-ALIAS: csrr t2, 2969
204 csrrs t2, 0xB99, zero
206 # mhpmcounter26h
207 # uimm12
208 # CHECK-INST: csrrs t2, 2970, zero
209 # CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xb9]
210 # CHECK-INST-ALIAS: csrr t2, 2970
211 csrrs t2, 0xB9A, zero
213 # mhpmcounter27h
214 # uimm12
215 # CHECK-INST: csrrs t2, 2971, zero
216 # CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xb9]
217 # CHECK-INST-ALIAS: csrr t2, 2971
218 csrrs t2, 0xB9B, zero
220 # mhpmcounter28h
221 # uimm12
222 # CHECK-INST: csrrs t2, 2972, zero
223 # CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xb9]
224 # CHECK-INST-ALIAS: csrr t2, 2972
225 csrrs t2, 0xB9C, zero
227 # mhpmcounter29h
228 # uimm12
229 # CHECK-INST: csrrs t2, 2973, zero
230 # CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xb9]
231 # CHECK-INST-ALIAS: csrr t2, 2973
232 csrrs t2, 0xB9D, zero
234 # mhpmcounter30h
235 # uimm12
236 # CHECK-INST: csrrs t2, 2974, zero
237 # CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xb9]
238 # CHECK-INST-ALIAS: csrr t2, 2974
239 csrrs t2, 0xB9E, zero
241 # mhpmcounter31h
242 # uimm12
243 # CHECK-INST: csrrs t2, 2975, zero
244 # CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xb9]
245 # CHECK-INST-ALIAS: csrr t2, 2975
246 csrrs t2, 0xB9F, zero