← Home

fflags

Floating-Point Accrued Exceptions

Address: 0x001 (1) · Privilege: U · Length: 32 · Writable · Defined by: F

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.

Fields

31:2423:1615:87:0
—NVDZOFUFNX
BitsFieldAliasDescriptionTypeReset
[4]NVfcsr.NVSet by hardware when a floating point operation is invalid and stays set until explicitly cleared by software.RW-HUNDEFINED_LEGAL
[3]DZfcsr.DZSet by hardware when a floating point divide attempts to divide by zero and stays set until explicitly cleared by software.RW-HUNDEFINED_LEGAL
[2]OFfcsr.OFSet by hardware when a floating point operation overflows and stays set until explicitly cleared by software.RW-HUNDEFINED_LEGAL
[1]UFfcsr.UFSet by hardware when a floating point operation underflows and stays set until explicitly cleared by software.RW-HUNDEFINED_LEGAL
[0]NXfcsr.NXSet by hardware when a floating point operation is inexact and stays set until explicitly cleared by software.RW-HUNDEFINED_LEGAL

Software read

return
 (CSR[fcsr].NV `<< 4) |
 (CSR[fcsr].DZ `<< 3) |
 (CSR[fcsr].OF `<< 2) |
 (CSR[fcsr].UF `<< 1) |
 CSR[fcsr].NX;

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.