NONCOMP clears the result bit for signaling NaNs in "not equal" compare
Created by: michael-platzer
The NONCOMP block sets the result bit when either operand of a "not equal" comparison is a NaN:
However, it does so only for quiet NaNs, not for signaling NaNs.
While the effect of the modifier bit on comparisons is not documented, a comment in the source code indicates that its effect should be to invert the boolean result of comparisons. If either operand is a NaN, the result bit is cleared, except for a "not equal" comparison, which sets the result bit when encountering a NaN. This is in line with the way NaN values are handled in compare instructions in the RISC-V spec.
Hence, in order to treat quiet and signaling NaNs consistently and to be in line with the RISC-V spec, I suggest to modify the NONCOMP compare logic to set the result bit when either of the operands of a "not equal" compare is a signaling NaN.