Eric Botcazou <ebotca...@adacore.com> writes: >> +/* Invoke T (CODE, ORDER, SIGNEDNESS, CAN_TRAP) for each comparison, where: >> + >> + - CODE is the rtl comparison code >> + - ORDER is the OR of the conditions under which CODE returns true >> + - SIGNEDNESS is the signedness of COND, or 0 if it is sign-agnostic >> + - CAN_TRAP is true if CODE can trap on some forms of NaN. */ > > Are you talking about any NaNs here or just quiet NaNs? If the former, > what's > the point to encode anything for signaling NaNs?
Yeah, the former, so... >> +#define FOR_MAPPING(T) \ >> + T (EQ, FLAGS_EQ, 0, true) \ >> + T (NE, ~FLAGS_EQ, 0, true) \ > > This doesn't look correct: EQ and NE do not trap on quiet NaNs, unlike GT/LT. ...trapping on signalling NaNs is enough for the field to be true. At least AIUI, __builtin_isunordered etc. don't raise an exception even for signalling NaNs. Thanks, Richard