frsr

Read FP control and status register Pseudo-instruction

Reads the FP control and status register into a register, as an alias of frcsr.

RISC-V manual: csrrs

Forms

  • Same as frcsr t1.

Operands

t1
Any integer register, x0 to x31, or its named alias, such as zero, t0 or t6.
# Initialize fcsr, then use frsr to read its old value or update it.
.text
li t3, 0
csrw t3, fcsr
frsr t1
# t1=0 because fcsr was cleared immediately above.