https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96983
--- Comment #20 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Peter Bergner from comment #18) > > Why aren't KFmode, IFmode and TFmode all 128??? Mike? > > This comes from rs6000-modes.h: > > /* We order the 3 128-bit floating point types so that IFmode (IBM 128-bit > floating point) is the 128-bit floating point type with the highest > precision (128 bits). This so that machine independent parts of the > compiler do not try to widen IFmode to TFmode on ISA 3.0 (power9) that has > hardware support for IEEE 128-bit. We set TFmode (long double mode) in > between, and KFmode (explicit __float128) below it. > > We won't encounter conversion from IEEE 128-bit to IBM 128-bit because we > don't have insns to support the IBM 128-bit aritmetic operations. */ > > #ifndef RS6000_MODES_H > #define RS6000_MODES_H 1 > #define FLOAT_PRECISION_IFmode 128 > #define FLOAT_PRECISION_TFmode 127 > #define FLOAT_PRECISION_KFmode 126 Yes, this is a useful hack, but it has its own problems; the underlying problem *still* has to be fixed (namely, the assumption that if you have two floating point modes, they are ordered such that any number in one of the modes can be represented in the other. In reality no such ordering exists: __ibm128 has values not representable in __ieee128, and vice versa). We do have two 16 byte floating point modes, and neither is "greater" than the other.