https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121570

--- Comment #11 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
The IEEE intrinsics where we currently save and restore the FP state are:
- IEEE_LOGB_RINT
- IEEE_REM
- IEEE_NEXT_AFTER

The intrinsics where we currently don't save and restore the FP state, because
I somehow convinced myself it was not necessary:
- IEEE_IS_NAN (calling the GCC __builtin_isnan)
- IEEE_IS_FINITE (calling the GCC __builtin_isfinite)
- IEEE_IS_UNORDERED (calling the GCC __builtin_isunordered)
- IEEE_SIGNBIT (__builtin_signbit)
- IEEE_IS_NORMAL (__builtin_isnormal)
- IEEE_IS_NEGATIVE (__builtin_isnegative)
- IEEE_SCALB (__builtin_scalbn)
- IEEE_COPY_SIGN (__builtin_copysign)
- IEEE_CLASS (__builtin_fpclassify, __builtin_issignaling, __builtin_signbit)
- IEEE_VALUE
- IEEE_FMA (__builtin_fma)
- IEEE_MIN_NUM, IEEE_MAX_NUM, and their _MAG variants (__builtin_isgreater,
__builtin_isless, __builtin_fmax, __builtin_fmin)
- all IEEE_QUIET_ and IEEE_SIGNALING_ comparison intrinsics (calling
__builtin_iseqsig, __builtin_isgreaterequal, __builtin_isgreater,
__builtin_islessequal, __builtin_isless)

All that code is in trans-intrinsic.cc, in the functions gfc_conv_ieee_*. See
which of these functions call gfc_save_fp_state and gfc_restore_fp_state, and
which don't.


Of course, I would love to have help in reviewing these past decisions!

Reply via email to