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# User Trap Setup 15################################## 16 17# ustatus 18# name 19# CHECK-INST: csrrs t1, ustatus, zero 20# CHECK-ENC: encoding: [0x73,0x23,0x00,0x00] 21# CHECK-INST-ALIAS: csrr t1, ustatus 22# uimm12 23# CHECK-INST: csrrs t2, ustatus, zero 24# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x00] 25# CHECK-INST-ALIAS: csrr t2, ustatus 26csrrs t1, ustatus, zero 27# uimm12 28csrrs t2, 0x000, zero 29 30# uie 31# name 32# CHECK-INST: csrrs t1, uie, zero 33# CHECK-ENC: encoding: [0x73,0x23,0x40,0x00] 34# CHECK-INST-ALIAS: csrr t1, uie 35# uimm12 36# CHECK-INST: csrrs t2, uie, zero 37# CHECK-ENC: encoding: [0xf3,0x23,0x40,0x00] 38# CHECK-INST-ALIAS: csrr t2, uie 39# name 40csrrs t1, uie, zero 41# uimm12 42csrrs t2, 0x004, zero 43 44# utvec 45# name 46# CHECK-INST: csrrs t1, utvec, zero 47# CHECK-ENC: encoding: [0x73,0x23,0x50,0x00] 48# CHECK-INST-ALIAS: csrr t1, utvec 49# uimm12 50# CHECK-INST: csrrs t2, utvec, zero 51# CHECK-ENC: encoding: [0xf3,0x23,0x50,0x00] 52# CHECK-INST-ALIAS: csrr t2, utvec 53# name 54csrrs t1, utvec, zero 55# uimm12 56csrrs t2, 0x005, zero 57 58################################## 59# User Trap Handling 60################################## 61 62# uscratch 63# name 64# CHECK-INST: csrrs t1, uscratch, zero 65# CHECK-ENC: encoding: [0x73,0x23,0x00,0x04] 66# CHECK-INST-ALIAS: csrr t1, uscratch 67# uimm12 68# CHECK-INST: csrrs t2, uscratch, zero 69# CHECK-ENC: encoding: [0xf3,0x23,0x00,0x04] 70# CHECK-INST-ALIAS: csrr t2, uscratch 71# name 72csrrs t1, uscratch, zero 73# uimm12 74csrrs t2, 0x040, zero 75 76# uepc 77# name 78# CHECK-INST: csrrs t1, uepc, zero 79# CHECK-ENC: encoding: [0x73,0x23,0x10,0x04] 80# CHECK-INST-ALIAS: csrr t1, uepc 81# uimm12 82# CHECK-INST: csrrs t2, uepc, zero 83# CHECK-ENC: encoding: [0xf3,0x23,0x10,0x04] 84# CHECK-INST-ALIAS: csrr t2, uepc 85# name 86csrrs t1, uepc, zero 87# uimm12 88csrrs t2, 0x041, zero 89 90# ucause 91# name 92# CHECK-INST: csrrs t1, ucause, zero 93# CHECK-ENC: encoding: [0x73,0x23,0x20,0x04] 94# CHECK-INST-ALIAS: csrr t1, ucause 95# uimm12 96# CHECK-INST: csrrs t2, ucause, zero 97# CHECK-ENC: encoding: [0xf3,0x23,0x20,0x04] 98# CHECK-INST-ALIAS: csrr t2, ucause 99# name 100csrrs t1, ucause, zero 101# uimm12 102csrrs t2, 0x042, zero 103 104# utval 105# name 106# CHECK-INST: csrrs t1, utval, zero 107# CHECK-ENC: encoding: [0x73,0x23,0x30,0x04] 108# CHECK-INST-ALIAS: csrr t1, utval 109# uimm12 110# CHECK-INST: csrrs t2, utval, zero 111# CHECK-ENC: encoding: [0xf3,0x23,0x30,0x04] 112# CHECK-INST-ALIAS: csrr t2, utval 113# name 114csrrs t1, utval, zero 115# uimm12 116csrrs t2, 0x043, zero 117 118# uip 119# name 120# CHECK-INST: csrrs t1, uip, zero 121# CHECK-ENC: encoding: [0x73,0x23,0x40,0x04] 122# CHECK-INST-ALIAS: csrr t1, uip 123# uimm12 124# CHECK-INST: csrrs t2, uip, zero 125# CHECK-ENC: encoding: [0xf3,0x23,0x40,0x04] 126# CHECK-INST-ALIAS: csrr t2, uip 127#name 128csrrs t1, uip, zero 129# uimm12 130csrrs t2, 0x044, zero 131 132################################## 133# User Floating Pont CSRs 134################################## 135# Tests in rvf-user-mode-csr.s 136 137################################## 138# User Counter and Timers 139################################## 140 141# cycle 142# name 143# CHECK-INST: csrrs t1, cycle, zero 144# CHECK-ENC: encoding: [0x73,0x23,0x00,0xc0] 145# CHECK-INST-ALIAS: rdcycle t1 146# uimm12 147# CHECK-INST: csrrs t2, cycle, zero 148# CHECK-ENC: encoding: [0xf3,0x23,0x00,0xc0] 149# CHECK-INST-ALIAS: rdcycle t2 150# name 151csrrs t1, cycle, zero 152# uimm12 153csrrs t2, 0xC00, zero 154 155# time 156# name 157# CHECK-INST: csrrs t1, time, zero 158# CHECK-ENC: encoding: [0x73,0x23,0x10,0xc0] 159# CHECK-INST-ALIAS: rdtime t1 160# uimm12 161# CHECK-INST: csrrs t2, time, zero 162# CHECK-ENC: encoding: [0xf3,0x23,0x10,0xc0] 163# CHECK-INST-ALIAS: rdtime t2 164# name 165csrrs t1, time, zero 166# uimm12 167csrrs t2, 0xC01, zero 168 169# instret 170# name 171# CHECK-INST: csrrs t1, instret, zero 172# CHECK-ENC: encoding: [0x73,0x23,0x20,0xc0] 173# CHECK-INST-ALIAS: rdinstret t1 174# uimm12 175# CHECK-INST: csrrs t2, instret, zero 176# CHECK-ENC: encoding: [0xf3,0x23,0x20,0xc0] 177# CHECK-INST-ALIAS: rdinstret t2 178# name 179csrrs t1, instret, zero 180# uimm12 181csrrs t2, 0xC02, zero 182 183# hpmcounter3 184# name 185# CHECK-INST: csrrs t1, hpmcounter3, zero 186# CHECK-ENC: encoding: [0x73,0x23,0x30,0xc0] 187# CHECK-INST-ALIAS: csrr t1, hpmcounter3 188# uimm12 189# CHECK-INST: csrrs t2, hpmcounter3, zero 190# CHECK-ENC: encoding: [0xf3,0x23,0x30,0xc0] 191# CHECK-INST-ALIAS: csrr t2, hpmcounter3 192# name 193csrrs t1, hpmcounter3, zero 194# uimm12 195csrrs t2, 0xC03, zero 196 197# hpmcounter4 198# name 199# CHECK-INST: csrrs t1, hpmcounter4, zero 200# CHECK-ENC: encoding: [0x73,0x23,0x40,0xc0] 201# CHECK-INST-ALIAS: csrr t1, hpmcounter4 202# uimm12 203# CHECK-INST: csrrs t2, hpmcounter4, zero 204# CHECK-ENC: encoding: [0xf3,0x23,0x40,0xc0] 205# CHECK-INST-ALIAS: csrr t2, hpmcounter4 206# name 207csrrs t1, hpmcounter4, zero 208# uimm12 209csrrs t2, 0xC04, zero 210 211# hpmcounter5 212# name 213# CHECK-INST: csrrs t1, hpmcounter5, zero 214# CHECK-ENC: encoding: [0x73,0x23,0x50,0xc0] 215# CHECK-INST-ALIAS: csrr t1, hpmcounter5 216# uimm12 217# CHECK-INST: csrrs t2, hpmcounter5, zero 218# CHECK-ENC: encoding: [0xf3,0x23,0x50,0xc0] 219# CHECK-INST-ALIAS: csrr t2, hpmcounter5 220# name 221csrrs t1, hpmcounter5, zero 222# uimm12 223csrrs t2, 0xC05, zero 224 225# hpmcounter6 226# name 227# CHECK-INST: csrrs t1, hpmcounter6, zero 228# CHECK-ENC: encoding: [0x73,0x23,0x60,0xc0] 229# CHECK-INST-ALIAS: csrr t1, hpmcounter6 230# uimm12 231# CHECK-INST: csrrs t2, hpmcounter6, zero 232# CHECK-ENC: encoding: [0xf3,0x23,0x60,0xc0] 233# CHECK-INST-ALIAS: csrr t2, hpmcounter6 234# name 235csrrs t1, hpmcounter6, zero 236# uimm12 237csrrs t2, 0xC06, zero 238 239# hpmcounter7 240# name 241# CHECK-INST: csrrs t1, hpmcounter7, zero 242# CHECK-ENC: encoding: [0x73,0x23,0x70,0xc0] 243# CHECK-INST-ALIAS: csrr t1, hpmcounter7 244# uimm12 245# CHECK-INST: csrrs t2, hpmcounter7, zero 246# CHECK-ENC: encoding: [0xf3,0x23,0x70,0xc0] 247# CHECK-INST-ALIAS: csrr t2, hpmcounter7 248# name 249csrrs t1, hpmcounter7, zero 250# uimm12 251csrrs t2, 0xC07, zero 252 253# hpmcounter8 254# name 255# CHECK-INST: csrrs t1, hpmcounter8, zero 256# CHECK-ENC: encoding: [0x73,0x23,0x80,0xc0] 257# CHECK-INST-ALIAS: csrr t1, hpmcounter8 258# uimm12 259# CHECK-INST: csrrs t2, hpmcounter8, zero 260# CHECK-ENC: encoding: [0xf3,0x23,0x80,0xc0] 261# CHECK-INST-ALIAS: csrr t2, hpmcounter8 262# name 263csrrs t1, hpmcounter8, zero 264# uimm12 265csrrs t2, 0xC08, zero 266 267# hpmcounter9 268# name 269# CHECK-INST: csrrs t1, hpmcounter9, zero 270# CHECK-ENC: encoding: [0x73,0x23,0x90,0xc0] 271# CHECK-INST-ALIAS: csrr t1, hpmcounter9 272# uimm12 273# CHECK-INST: csrrs t2, hpmcounter9, zero 274# CHECK-ENC: encoding: [0xf3,0x23,0x90,0xc0] 275# CHECK-INST-ALIAS: csrr t2, hpmcounter9 276# name 277csrrs t1, hpmcounter9, zero 278# uimm12 279csrrs t2, 0xC09, zero 280 281# hpmcounter10 282# name 283# CHECK-INST: csrrs t1, hpmcounter10, zero 284# CHECK-ENC: encoding: [0x73,0x23,0xa0,0xc0] 285# CHECK-INST-ALIAS: csrr t1, hpmcounter10 286# uimm12 287# CHECK-INST: csrrs t2, hpmcounter10, zero 288# CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xc0] 289# CHECK-INST-ALIAS: csrr t2, hpmcounter10 290# name 291csrrs t1, hpmcounter10, zero 292# uimm12 293csrrs t2, 0xC0A, zero 294 295# hpmcounter11 296# name 297# CHECK-INST: csrrs t1, hpmcounter11, zero 298# CHECK-ENC: encoding: [0x73,0x23,0xb0,0xc0] 299# CHECK-INST-ALIAS: csrr t1, hpmcounter11 300# uimm12 301# CHECK-INST: csrrs t2, hpmcounter11, zero 302# CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xc0] 303# CHECK-INST-ALIAS: csrr t2, hpmcounter11 304# name 305csrrs t1, hpmcounter11, zero 306# uimm12 307csrrs t2, 0xC0B, zero 308 309# hpmcounter12 310# name 311# CHECK-INST: csrrs t1, hpmcounter12, zero 312# CHECK-ENC: encoding: [0x73,0x23,0xc0,0xc0] 313# CHECK-INST-ALIAS: csrr t1, hpmcounter12 314# uimm12 315# CHECK-INST: csrrs t2, hpmcounter12, zero 316# CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xc0] 317# CHECK-INST-ALIAS: csrr t2, hpmcounter12 318# name 319csrrs t1, hpmcounter12, zero 320# uimm12 321csrrs t2, 0xC0C, zero 322 323# hpmcounter13 324# name 325# CHECK-INST: csrrs t1, hpmcounter13, zero 326# CHECK-ENC: encoding: [0x73,0x23,0xd0,0xc0] 327# CHECK-INST-ALIAS: csrr t1, hpmcounter13 328# uimm12 329# CHECK-INST: csrrs t2, hpmcounter13, zero 330# CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xc0] 331# CHECK-INST-ALIAS: csrr t2, hpmcounter13 332# name 333csrrs t1, hpmcounter13, zero 334# uimm12 335csrrs t2, 0xC0D, zero 336 337# hpmcounter14 338# name 339# CHECK-INST: csrrs t1, hpmcounter14, zero 340# CHECK-ENC: encoding: [0x73,0x23,0xe0,0xc0] 341# CHECK-INST-ALIAS: csrr t1, hpmcounter14 342# uimm12 343# CHECK-INST: csrrs t2, hpmcounter14, zero 344# CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xc0] 345# CHECK-INST-ALIAS: csrr t2, hpmcounter14 346# name 347csrrs t1, hpmcounter14, zero 348# uimm12 349csrrs t2, 0xC0E, zero 350 351# hpmcounter15 352# name 353# CHECK-INST: csrrs t1, hpmcounter15, zero 354# CHECK-ENC: encoding: [0x73,0x23,0xf0,0xc0] 355# CHECK-INST-ALIAS: csrr t1, hpmcounter15 356# uimm12 357# CHECK-INST: csrrs t2, hpmcounter15, zero 358# CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xc0] 359# CHECK-INST-ALIAS: csrr t2, hpmcounter15 360# name 361csrrs t1, hpmcounter15, zero 362# uimm12 363csrrs t2, 0xC0F, zero 364 365# hpmcounter16 366# name 367# CHECK-INST: csrrs t1, hpmcounter16, zero 368# CHECK-ENC: encoding: [0x73,0x23,0x00,0xc1] 369# CHECK-INST-ALIAS: csrr t1, hpmcounter16 370# uimm12 371# CHECK-INST: csrrs t2, hpmcounter16, zero 372# CHECK-ENC: encoding: [0xf3,0x23,0x00,0xc1] 373# CHECK-INST-ALIAS: csrr t2, hpmcounter16 374# name 375csrrs t1, hpmcounter16, zero 376# uimm12 377csrrs t2, 0xC10, zero 378 379# hpmcounter17 380# name 381# CHECK-INST: csrrs t1, hpmcounter17, zero 382# CHECK-ENC: encoding: [0x73,0x23,0x10,0xc1] 383# CHECK-INST-ALIAS: csrr t1, hpmcounter17 384# uimm12 385# CHECK-INST: csrrs t2, hpmcounter17, zero 386# CHECK-ENC: encoding: [0xf3,0x23,0x10,0xc1] 387# CHECK-INST-ALIAS: csrr t2, hpmcounter17 388# name 389csrrs t1, hpmcounter17, zero 390# uimm12 391csrrs t2, 0xC11, zero 392 393# hpmcounter18 394# name 395# CHECK-INST: csrrs t1, hpmcounter18, zero 396# CHECK-ENC: encoding: [0x73,0x23,0x20,0xc1] 397# CHECK-INST-ALIAS: csrr t1, hpmcounter18 398# uimm12 399# CHECK-INST: csrrs t2, hpmcounter18, zero 400# CHECK-ENC: encoding: [0xf3,0x23,0x20,0xc1] 401# CHECK-INST-ALIAS: csrr t2, hpmcounter18 402# name 403csrrs t1, hpmcounter18, zero 404# uimm12 405csrrs t2, 0xC12, zero 406 407# hpmcounter19 408# name 409# CHECK-INST: csrrs t1, hpmcounter19, zero 410# CHECK-ENC: encoding: [0x73,0x23,0x30,0xc1] 411# CHECK-INST-ALIAS: csrr t1, hpmcounter19 412# uimm12 413# CHECK-INST: csrrs t2, hpmcounter19, zero 414# CHECK-ENC: encoding: [0xf3,0x23,0x30,0xc1] 415# CHECK-INST-ALIAS: csrr t2, hpmcounter19 416# name 417csrrs t1, hpmcounter19, zero 418# uimm12 419csrrs t2, 0xC13, zero 420 421# hpmcounter20 422# name 423# CHECK-INST: csrrs t1, hpmcounter20, zero 424# CHECK-ENC: encoding: [0x73,0x23,0x40,0xc1] 425# CHECK-INST-ALIAS: csrr t1, hpmcounter20 426# uimm12 427# CHECK-INST: csrrs t2, hpmcounter20, zero 428# CHECK-ENC: encoding: [0xf3,0x23,0x40,0xc1] 429# CHECK-INST-ALIAS: csrr t2, hpmcounter20 430# name 431csrrs t1, hpmcounter20, zero 432# uimm12 433csrrs t2, 0xC14, zero 434 435# hpmcounter21 436# name 437# CHECK-INST: csrrs t1, hpmcounter21, zero 438# CHECK-ENC: encoding: [0x73,0x23,0x50,0xc1] 439# CHECK-INST-ALIAS: csrr t1, hpmcounter21 440# uimm12 441# CHECK-INST: csrrs t2, hpmcounter21, zero 442# CHECK-ENC: encoding: [0xf3,0x23,0x50,0xc1] 443# CHECK-INST-ALIAS: csrr t2, hpmcounter21 444# name 445csrrs t1, hpmcounter21, zero 446# uimm12 447csrrs t2, 0xC15, zero 448 449# hpmcounter22 450# name 451# CHECK-INST: csrrs t1, hpmcounter22, zero 452# CHECK-ENC: encoding: [0x73,0x23,0x60,0xc1] 453# CHECK-INST-ALIAS: csrr t1, hpmcounter22 454# uimm12 455# CHECK-INST: csrrs t2, hpmcounter22, zero 456# CHECK-ENC: encoding: [0xf3,0x23,0x60,0xc1] 457# CHECK-INST-ALIAS: csrr t2, hpmcounter22 458# name 459csrrs t1, hpmcounter22, zero 460# uimm12 461csrrs t2, 0xC16, zero 462 463# hpmcounter23 464# name 465# CHECK-INST: csrrs t1, hpmcounter23, zero 466# CHECK-ENC: encoding: [0x73,0x23,0x70,0xc1] 467# CHECK-INST-ALIAS: csrr t1, hpmcounter23 468# uimm12 469# CHECK-INST: csrrs t2, hpmcounter23, zero 470# CHECK-ENC: encoding: [0xf3,0x23,0x70,0xc1] 471# CHECK-INST-ALIAS: csrr t2, hpmcounter23 472# name 473csrrs t1, hpmcounter23, zero 474# uimm12 475csrrs t2, 0xC17, zero 476 477# hpmcounter24 478# name 479# CHECK-INST: csrrs t1, hpmcounter24, zero 480# CHECK-ENC: encoding: [0x73,0x23,0x80,0xc1] 481# CHECK-INST-ALIAS: csrr t1, hpmcounter24 482# uimm12 483# CHECK-INST: csrrs t2, hpmcounter24, zero 484# CHECK-ENC: encoding: [0xf3,0x23,0x80,0xc1] 485# CHECK-INST-ALIAS: csrr t2, hpmcounter24 486# name 487csrrs t1, hpmcounter24, zero 488# uimm12 489csrrs t2, 0xC18, zero 490 491# hpmcounter25 492# name 493# CHECK-INST: csrrs t1, hpmcounter25, zero 494# CHECK-ENC: encoding: [0x73,0x23,0x90,0xc1] 495# CHECK-INST-ALIAS: csrr t1, hpmcounter25 496# uimm12 497# CHECK-INST: csrrs t2, hpmcounter25, zero 498# CHECK-ENC: encoding: [0xf3,0x23,0x90,0xc1] 499# CHECK-INST-ALIAS: csrr t2, hpmcounter25 500# name 501csrrs t1, hpmcounter25, zero 502# uimm12 503csrrs t2, 0xC19, zero 504 505# hpmcounter26 506# name 507# CHECK-INST: csrrs t1, hpmcounter26, zero 508# CHECK-ENC: encoding: [0x73,0x23,0xa0,0xc1] 509# CHECK-INST-ALIAS: csrr t1, hpmcounter26 510# uimm12 511# CHECK-INST: csrrs t2, hpmcounter26, zero 512# CHECK-ENC: encoding: [0xf3,0x23,0xa0,0xc1] 513# CHECK-INST-ALIAS: csrr t2, hpmcounter26 514# name 515csrrs t1, hpmcounter26, zero 516# uimm12 517csrrs t2, 0xC1A, zero 518 519# hpmcounter27 520# name 521# CHECK-INST: csrrs t1, hpmcounter27, zero 522# CHECK-ENC: encoding: [0x73,0x23,0xb0,0xc1] 523# CHECK-INST-ALIAS: csrr t1, hpmcounter27 524# uimm12 525# CHECK-INST: csrrs t2, hpmcounter27, zero 526# CHECK-ENC: encoding: [0xf3,0x23,0xb0,0xc1] 527# CHECK-INST-ALIAS: csrr t2, hpmcounter27 528# name 529csrrs t1, hpmcounter27, zero 530# uimm12 531csrrs t2, 0xC1B, zero 532 533# hpmcounter28 534# name 535# CHECK-INST: csrrs t1, hpmcounter28, zero 536# CHECK-ENC: encoding: [0x73,0x23,0xc0,0xc1] 537# CHECK-INST-ALIAS: csrr t1, hpmcounter28 538# uimm12 539# CHECK-INST: csrrs t2, hpmcounter28, zero 540# CHECK-ENC: encoding: [0xf3,0x23,0xc0,0xc1] 541# CHECK-INST-ALIAS: csrr t2, hpmcounter28 542# name 543csrrs t1, hpmcounter28, zero 544# uimm12 545csrrs t2, 0xC1C, zero 546 547# hpmcounter29 548# name 549# CHECK-INST: csrrs t1, hpmcounter29, zero 550# CHECK-ENC: encoding: [0x73,0x23,0xd0,0xc1] 551# CHECK-INST-ALIAS: csrr t1, hpmcounter29 552# uimm12 553# CHECK-INST: csrrs t2, hpmcounter29, zero 554# CHECK-ENC: encoding: [0xf3,0x23,0xd0,0xc1] 555# CHECK-INST-ALIAS: csrr t2, hpmcounter29 556# name 557csrrs t1, hpmcounter29, zero 558# uimm12 559csrrs t2, 0xC1D, zero 560 561# hpmcounter30 562# name 563# CHECK-INST: csrrs t1, hpmcounter30, zero 564# CHECK-ENC: encoding: [0x73,0x23,0xe0,0xc1] 565# CHECK-INST-ALIAS: csrr t1, hpmcounter30 566# uimm12 567# CHECK-INST: csrrs t2, hpmcounter30, zero 568# CHECK-ENC: encoding: [0xf3,0x23,0xe0,0xc1] 569# CHECK-INST-ALIAS: csrr t2, hpmcounter30 570# name 571csrrs t1, hpmcounter30, zero 572# uimm12 573csrrs t2, 0xC1E, zero 574 575# hpmcounter31 576# name 577# CHECK-INST: csrrs t1, hpmcounter31, zero 578# CHECK-ENC: encoding: [0x73,0x23,0xf0,0xc1] 579# CHECK-INST-ALIAS: csrr t1, hpmcounter31 580# uimm12 581# CHECK-INST: csrrs t2, hpmcounter31, zero 582# CHECK-ENC: encoding: [0xf3,0x23,0xf0,0xc1] 583# CHECK-INST-ALIAS: csrr t2, hpmcounter31 584# name 585csrrs t1, hpmcounter31, zero 586# uimm12 587csrrs t2, 0xC1F, zero 588