[BUG] Incorrect Accumulation of ‘OF’ Flag in fflags After Executing fsqrt.d on Infinity #2058
Open
1 task done
Labels
notCV32A65X
It is not an CV32A65X issue
PARAM:FPU
Issue depends on the FPU parameter
Type:Bug
For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Is there an existing CVA6 bug for this?
Bug Description
When executing the
fsqrt.d
instruction on a double-precision floating-point value representing positive infinity (0x7ff0000000000000), the Overflow (OF) flag in the fflags register is erroneously set. According to the IEEE 754 standard and the RISC-V specification, the fsqrt.d operation should not lead to an overflow situation when the input is infinity. This also results in inconsistency with Spike's outputExpected Behavior:
The
OF
flag in the fflags register should remain clear (i.e., not set) after performing a square root operation on an infinite value, as the result is well-defined and should be positive infinity.Actual Behavior:
The
OF
flag is set in the fflags register, indicating an overflow, which contradicts the expected behavior defined by the IEEE 754 standard and RISC-V floating-point operation guidelines.Steps to Reproduce:
0x7ff0000000000000
(positive infinity).fsqrt.d
instruction on this register.fflags
register; observe that theOF
flag is incorrectly set.The text was updated successfully, but these errors were encountered: