Floating-Point Accrued Exceptions
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.
| 31:24 | 23:16 | 15:8 | 7:0 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| — | NV | DZ | OF | UF | NX | ||||||||||||||||||||||||||
| Bits | Field | Alias | Description | Type | Reset |
|---|---|---|---|---|---|
| [4] | NV | fcsr.NV | Set by hardware when a floating point operation is invalid and stays set until explicitly cleared by software. | RW-H | UNDEFINED_LEGAL |
| [3] | DZ | fcsr.DZ | Set by hardware when a floating point divide attempts to divide by zero and stays set until explicitly cleared by software. | RW-H | UNDEFINED_LEGAL |
| [2] | OF | fcsr.OF | Set by hardware when a floating point operation overflows and stays set until explicitly cleared by software. | RW-H | UNDEFINED_LEGAL |
| [1] | UF | fcsr.UF | Set by hardware when a floating point operation underflows and stays set until explicitly cleared by software. | RW-H | UNDEFINED_LEGAL |
| [0] | NX | fcsr.NX | Set by hardware when a floating point operation is inexact and stays set until explicitly cleared by software. | RW-H | UNDEFINED_LEGAL |
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.