csrrsi

Operands

reg, csr, imm

Atomic Read/Set CSR Immediate: read from the CSR into t0 and logical or a constant into the CSR

Variants

  • Atomic Read/Set CSR Immediate: read from the CSR into t0 and logical or a constant into the CSR csrrsi t0, fcsr, 10
# Initialize fcsr=0; csrrsi returns old fcsr in t0 and leaves fcsr=1.
.text
li t3, 0
csrw t3, fcsr
csrrsi t0, fcsr, 1