Skip to content

Commit 41be541

Browse files
authored
[RISCV] Add srmcfg CSR from Ssqosid extension. (#79914)
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.
1 parent 20a9fa3 commit 41be541

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

llvm/lib/Target/RISCV/RISCVSystemOperands.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ def : SysReg<"sip", 0x144>;
132132
let DeprecatedName = "sptbr" in
133133
def : SysReg<"satp", 0x180>;
134134

135+
//===----------------------------------------------------------------------===//
136+
// Quality-of-Service(QoS) Identifiers (Ssqosid)
137+
//===----------------------------------------------------------------------===//
138+
def : SysReg<"srmcfg", 0x181>;
139+
135140
//===----------------------------------------------------------------------===//
136141
// Debug/Trace Registers
137142
//===----------------------------------------------------------------------===//

llvm/test/MC/RISCV/supervisor-csr-names.s

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,24 @@ csrrs t1, satp, zero
196196
# uimm12
197197
csrrs t2, 0x180, zero
198198

199+
#########################################
200+
# Quality-of-Service(QoS) Identifiers
201+
#########################################
202+
203+
# srmcfg
204+
# name
205+
# CHECK-INST: csrrs t1, srmcfg, zero
206+
# CHECK-ENC: encoding: [0x73,0x23,0x10,0x18]
207+
# CHECK-INST-ALIAS: csrr t1, srmcfg
208+
# uimm12
209+
# CHECK-INST: csrrs t2, srmcfg, zero
210+
# CHECK-ENC: encoding: [0xf3,0x23,0x10,0x18]
211+
# CHECK-INST-ALIAS: csrr t2, srmcfg
212+
# name
213+
csrrs t1, srmcfg, zero
214+
# uimm12
215+
csrrs t2, 0x181, zero
216+
199217
#########################################
200218
# Debug/Trace Registers
201219
#########################################

0 commit comments

Comments
 (0)