I’ve recently added IEEE support for the Fortran front-end and library. As part
of that, the front-end should be able to determine which of the available
floating-point types are IEEE-conforming [1]. Right now, I’ve taken a
conservative approach and only considered the target’s float_type_node and
double_type_node as IEEE modes, but I’d like to improve that (for example, to
include long double and binary128 modes on x86).
How can I determine, from a “struct real_format”, whether it is an IEEE format
or not? I’ve looked through gcc/real.{h,c} but could find no clear solution. If
there is none, would it be okay to add a new bool field to the structure, named
“ieee” or “ieee_format”, to discriminate?
Thanks,
FX
[1] The Fortran standard defines such as types as having an "IEC 60559:1989
floating-point format”. Decimal formats are out, as they are unsupported in
gfortran, so I guess this definition covers binary16 to binary128, as well as
extended and extendable precision formats.