ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

sireg

T1 riscv register register
Supervisor Indirect Register Alias
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRISC-V Privileged (Smcsrind, Sscsrind)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
PrivilegeS
ExtensionsSmcsrind, Sscsrind

Summary

Access to sireg from M-mode or S-mode while siselect holds a number in a standard-defined and implemented range results in specific behavior that, for each combination of siselect and sireg, is defined by the extension to which the siselect value is allocated.

Syntax / Encoding

CSR 0x151 (S-mode, RW)

Bitfields (1)

BitsFieldDescription
63:0VALUEThe data read from or written to the register selected by the current siselect value. [RV32: 31:0, RV64: 63:0]

Reference Notes

Access to `sireg` from M-mode or S-mode while `siselect` holds a number in a
standard-defined and implemented range results in specific behavior that, for each combination of
`siselect` and `sireg`, is defined by the extension to which the `siselect` value is allocated.

Ordinarily, `sireg` will access register state, access read-only 0 state, or, unless
executing in a virtual machine (covered in the next section), raise an illegal instruction
exception.

Note that the widths of `siselect` and `sireg` are always the current XLEN rather than SXLEN. Hence,
for example, if MXLEN = 64 and SXLEN = 32, then this register is 64 bits when the current
privilege mode is M (running RV64 code) but 32 bits when the privilege mode is S (RV32 code).

The behavior upon accessing `sireg` from M-mode or S-mode, while `siselect` holds a value that is
not implemented at supervisor level, is UNSPECIFIED.

It is recommended that implementations raise an illegal instruction exception for such
accesses, to facilitate possible emulation (by M-mode) of these accesses.

An extension is considered not to be implemented at supervisor level if machine level has
disabled the extension for S-mode, such as by the settings of certain fields in CSR
`menvcfg`, for example.