csrrs

Operands

reg, csr, reg

Atomic Read/Set CSR: read from the CSR into t0 and logical or t1 into the CSR

Variants

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