frflags

Read FP exception flags Pseudo-instruction

Reads the FP exception flags into t1.

RISC-V manual: csrrs

Forms

Operands

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