fflags
Floating-Point Accrued Exceptions
- Address
0x001- Group
- Unprivileged and user-level CSRs
- Privilege
URW(privileged spec CSR listing, Unprivileged Floating-Point CSRs)- Access
- read/write; lowest privilege U (user/unprivileged)
- Address range
- Standard read/write
- Name in riscv-unified-db
- Floating-Point Accrued Exceptions
Privileged spec: Floating-Point Accrued Exceptions
Description
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.
From riscv-unified-db, reformatted.
Fields
| Field | Bits | Type | Description |
|---|---|---|---|
NV | 4 | RW-H | Invalid Operation. Set by hardware when a floating point operation is invalid and stays set until explicitly cleared by software. |
DZ | 3 | RW-H | Divide by Zero. Set by hardware when a floating point divide attempts to divide by zero and stays set until explicitly cleared by software. |
OF | 2 | RW-H | Overflow. Set by hardware when a floating point operation overflows and stays set until explicitly cleared by software. |
UF | 1 | RW-H | Underflow. Set by hardware when a floating point operation underflows and stays set until explicitly cleared by software. |
NX | 0 | RW-H | Inexact. Set by hardware when a floating point operation is inexact and stays set until explicitly cleared by software. |
Fields from riscv-unified-db; field types computed by IDL functions there are not shown.
Specification and related pages
- The RISC-V Instruction Set Manual, Volume II: CSR listing (src/priv/csrs.adoc)
- riscv-opcodes csrs.csv
- riscv-unified-db: spec/std/isa/csr/F/fflags.yaml
- csrrw, csrrs, csrrc (Zicsr instructions that access CSRs)