fflags
riscv_unified_db)RV32 / RV64 (Ratified & Standard Extensions)
main
UFSummary
The accrued exception flags indicate the exception conditions that have arisen on any floating-point arithmetic instruction since the field was last reset by software.
Syntax / Encoding
CSR 0x001 (U-mode, RW)
Bitfields (5)
| Bits | Field | Description |
|---|---|---|
4 | NV | Set by hardware when a floating point operation is invalid and stays set until explicitly cleared by software. |
3 | DZ | Set by hardware when a floating point divide attempts to divide by zero and stays set until explicitly cleared by software. |
2 | OF | Set by hardware when a floating point operation overflows and stays set until explicitly cleared by software. |
1 | UF | Set by hardware when a floating point operation underflows and stays set until explicitly cleared by software. |
0 | NX | Set by hardware when a floating point operation is inexact and stays set until explicitly cleared by software. |
Reference Notes
The accrued exception flags indicate the exception conditions that have arisen on any floating-point arithmetic instruction since the field was last reset by software. The base RISC-V ISA does not support generating a trap on the setting of a floating-point exception flag. As allowed by the standard, we do not support traps on floating-point exceptions in the F extension, but instead require explicit checks of the flags in software. We considered adding branches controlled directly by the contents of the floating-point accrued exception flags, but ultimately chose to omit these instructions to keep the ISA simple.