fssr

Swap FP control and status register Pseudo-instruction

Swaps t2 into the FP control and status register, storing its old value in t1, as an alias of fscsr.

RISC-V manual: csrrw

Forms

  • Same as fscsr t1, t2.

  • Same as fscsr t1.

Operands

t1
Any integer register, x0 to x31, or its named alias, such as zero, t0 or t6.
t2
An integer register. It may be the same register as t1.
# Initialize fcsr, then use fssr to read its old value or update it.
.text
li t3, 0
csrw t3, fcsr
li t0, 1
fssr t1, t0
# t1=0 is the old value; fcsr becomes 1.