On Tue, Dec 29, 2015 at 10:43 AM, Michael Meissner <meiss...@linux.vnet.ibm.com> wrote: > This is a clean-up patch for IEEE 128-bit floating point support on the > PowerPC. > > The main change is to change the way comparisons are done when IEEE 128-bit > floating is emulated. Previously, I had added special __cmpkf2 and __cmpukf2 > functions that were modeled on the CR bits that the XSCMPUQP instruction sets. > I have changed this to use the standard EQ, GE, LE, and UNORD functions > provided by glibc/libgcc's software floating point emulation functions. > > I've done some debugging on issues with _Complex __float128, and I think at > the > moment it is just not feasible to support _Complex __float128 in GCC 6.x. The > main problem is the way the IFmode/KFmode types are added as fractional > floating > point types which prevents them from being default types for conversion. I > think in order to support this, the machine independent type system is going > to > have to be tinkered with. However, since we are now coming to the end of > stage3 it is not the time to be making these changes. > > I added documentation to state that right now -mfloat128 is only enabled on > 64-bit PowerPC Linux systems. There is some desire for this to be eventually > supported on other systems like FreeBSD, but I wanted to set expectations for > users interested in the this. I also documented that complex __float128 > currently does not work. > > I added an undocumented debug switch (-mfloat128-convert) that enables default > conversions between IBM extended double and IEEE 128-bit floating point, to > enable further debugging of the complex __float128 support in the future. > > Finally, I noticed if you use -mabi=ieeelongdouble, that it generated calls to > convert between long double and explicit __float128, even though they are the > same representation, and fixed that. > > Going forward, patch #11 will enable the software emulation library. At the > moment, there is no support for converting between decimal types and > __float128, nor for the complex __float128 support. These are being worked > on, > and should be done in the GCC 7.x time frame. However, it is important to add > the software emulation support in GCC 6.x so that most users that want to use > IEEE 128-bit floating point can use it, and that we can work on the glibc > issues to fully support __float128 in the GCC 7.x time frame. > > 2015-12-29 Michael Meissner <meiss...@linux.vnet.ibm.com> > > * config/rs6000/rs6000.c (init_float128_ieee): Remove IEEE 128-bit > comparison functions in cmp_optab and ucmp_optab. > (rs6000_generate_compare): Rewrite IEEE 128-bit floating point > software emulation comparisons to only use __eqkf2, __gekf2, > __lekf2, and __unordkf2 functions. > (rs6000_invalid_binary_op): Add support for -mfloat128-convert. > > * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define > __FLOAT128_HARDWARE__ if hardware IEEE 128-bit support is > available. > > * config/rs6000/rs6000.opt (-mfloat128-convert): Add debug switch > to allow IBM extended double and IEEE 128-bit floating point to be > converted with default conversions. > > * config/rs6000/rs6000.md (extendkftf2): Add converters between > KFmode and TFmode if -mabi=ieeelongdouble. > (trunctfkf2): Likewise. > (ieee128_mfvsrd): Split 64-bit integer conversions into 32-bit and > 64-bit insns. > (ieee128_mfvsrd_64bit): Likewise. > (ieee128_mfvsrd_32bit): Likewise. > (ieee128_mtvsrd): Likewise. > (ieee128_mtvsrd_64bit): Likewise. > (ieee128_mtvsrd_32bit): Likewise. > > * doc/extend.texi (Floating Types): Document that complex > __float128 does not work currently. > > * doc/invoke.texi (RS/6000 and PowerPC Options): Document that > -mfloat128 is only supported on PowerPC 64-bit Linux systems.
Okay. Thanks, David