csrrsi

The CSRRSI variant is similar to CSRRS, except this updates the CSR using an XLEN-bit value obtained by zero-extending a 5-bit unsigned immediate (imm[4:0]) field encoded in the `xs1` field instead of a value from an integer register. For CSRRSI, if the `imm[4:0]` field is zero, then this instruction will not write to the CSR, and shall not cause any of the side effects that might otherwise occur on a CSR write, nor raise illegal-instruction exceptions on accesses to read-only CSRs. The CSRRSI will always read the CSR and cause any read side effects regardless of `xd` and `xs1` fields.

Synopsis

csrrsi xd, csr, imm

Encoding

Type:

067111214151920311110011xd110immcsr
funct3: 110
opcode: 1110011

RISC-V Instruction Encoder/Decoder

open csrrsi in rvcodecjs

Availability