Skip to content

Commit

Permalink
[RISCV] Add srmcfg CSR from Ssqosid extension. (llvm#79914)
Browse files Browse the repository at this point in the history
Based on the spec here
https://github.com/riscv/riscv-ssqosid/releases/tag/v1.0-rc1

Ssqosid extension name will be added in a separate patch.
  • Loading branch information
topperc authored and agozillon committed Feb 5, 2024
1 parent 60c0c67 commit 9b6a06e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/Target/RISCV/RISCVSystemOperands.td
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ def : SysReg<"sip", 0x144>;
let DeprecatedName = "sptbr" in
def : SysReg<"satp", 0x180>;

//===----------------------------------------------------------------------===//
// Quality-of-Service(QoS) Identifiers (Ssqosid)
//===----------------------------------------------------------------------===//
def : SysReg<"srmcfg", 0x181>;

//===----------------------------------------------------------------------===//
// Debug/Trace Registers
//===----------------------------------------------------------------------===//
Expand Down
18 changes: 18 additions & 0 deletions llvm/test/MC/RISCV/supervisor-csr-names.s
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,24 @@ csrrs t1, satp, zero
# uimm12
csrrs t2, 0x180, zero

#########################################
# Quality-of-Service(QoS) Identifiers
#########################################

# srmcfg
# name
# CHECK-INST: csrrs t1, srmcfg, zero
# CHECK-ENC: encoding: [0x73,0x23,0x10,0x18]
# CHECK-INST-ALIAS: csrr t1, srmcfg
# uimm12
# CHECK-INST: csrrs t2, srmcfg, zero
# CHECK-ENC: encoding: [0xf3,0x23,0x10,0x18]
# CHECK-INST-ALIAS: csrr t2, srmcfg
# name
csrrs t1, srmcfg, zero
# uimm12
csrrs t2, 0x181, zero

#########################################
# Debug/Trace Registers
#########################################
Expand Down

0 comments on commit 9b6a06e

Please sign in to comment.