Atomic Read/Clear CSR: read from the CSR into t0 and clear bits of the CSR according to t1
csrrc
Operands
reg, csr, regVariants
- Atomic Read/Clear CSR: read from the CSR into t0 and clear bits of the CSR according to t1 csrrc t0, fcsr, t1
# Initialize fcsr=1; csrrc returns old fcsr in t0 and leaves fcsr=0.
.text
li t3, 1
csrw t3, fcsr
li t1, 1
csrrc t0, fcsr, t1