csrr
Read control and status register
Reads the CSR into t1 without writing to it.
Forms
Operands
t1- Any integer register,
x0tox31, or its named alias, such aszero,t0ort6. csr- A control and status register, written by name or number, such as
fcsr,fflags,frm,cycle,time,instret,ustatus,uepc,ucauseorutval. See the supported registers.
# Clear fcsr with the documented alias, then read it with csrr. t0 is 0.
.text
li t1, 0
csrw t1, fcsr
csrr t0, fcsr