As we have discussed on the patch submission, I'm going to be back porting the IEEE 128-bit changes that we've made recently in the trunk to the GCC 8.x branch. The motivation is to allow distributions to switch to IEEE 128-bit long double without having to wait for the GCC 9.1 compiler.
I'm sending out these patches in terms of the submission to the FSF trunk. I will probably wait a few days before committing the patches just in case something major was broken. Patch #1 is the May 21st submission. Note, in this patch, we had 3 separate types activelly used (__ibm128, __float128, and long double). However we eventually decided we only wanted to use 2 types, and this changed in Patch #2. Patch #2 is the June 1-8th changes by me (Michael Meissner), Segher Boessenkool and David Edelsohn. In the second set of changed we changed this to the current two active types, one of which is the long double type, and other is the alternate type. We also changed the C++ mangling of the float128 type (and long double if it uses the IEEE 128-bit encoding) from "U10__float128" to "u9__ieee128". We put out weak aliases so that old code could still call functions compiled with the new compiler. Patch #3 is the change committed on June 18th that reworks the internal ordering of the 128-bit binary floating point types. This prevents the machine independent portions of the compiler trying to convert __ibm128 data to __float128 if you are running on a Power9 (ISA 3.0) system that has 128-bit hardware floating point support. Patch #4 will be a collection of small patches to fix some problems that were noticed in running the test suite with the long double default changed to IEEE 128-bit floating point. This is patch #2. Patches #1 and #2 were tested together on a little endian power8 system. I did two runs. The first run used the default long double as IBM extended double, and there were no regressions. The second run changed the default to IEEE 128-bit floating point. The regressions were the same as in the GCC trunk for the same submission level. [gcc] 2018-06-18 Michael Meissner <meiss...@linux.ibm.com> Back port from trunk 2018-06-08 David Edelsohn <dje....@gmail.com> * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if TARGET_ELF. Back port from trunk 2018-06-04 Michael Meissner <meiss...@linux.ibm.com> * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to track if we pass or return IEEE 128-bit floating point. (ieee128_mangling_gcc_8_1): New boolean to say whether to generate C++ mangling that is compatible with GCC 8.1. (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook. (init_cumulative_args): Note if we pass or return IEEE 128-bit floating point types. (rs6000_function_arg_advance_1): Likewise. (rs6000_mangle_type): Optionally generate mangled names that match what GCC 8.1 generated for IEEE 128-bit floating point types. (rs6000_globalize_decl_name): If we have an external function that passes or returns IEEE 128-bit types, generate a weak reference from the mangled name used in GCC 8.1 to the current mangled name. (rs6000_init_builtins): Make __ibm128 use the long double type if long double is IBM extended double. Make __float128 use the long double type if long double is IEEE 128-bit. PR target/85657 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper macro for __ibm128 built-in functions. (PACK_IF): Add __ibm128 pack/unpack functions. (UNPACK_IF): Likewise. * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not enable long double built-in functions if long double is IEEE 128-bit floating point. (rs6000_invalid_builtin): Update long double built-in function error message. (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in functions, adjust the built-in function to use the long double built-in function if __ibm128 and long double are the same type. * doc/extend.texi (PowerPC builtins): Update documention for __builtin_{,un}pack_longdouble. Add documentation for __builtin_{,un}pack_ibm128. Back port from trunk 2018-06-01 Segher Boessenkool <seg...@kernel.crashing.org> * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of the 128-bit floating point types. Fix function comment. [gcc/testsuite] 2018-06-18 Michael Meissner <meiss...@linux.ibm.com> Back port from trunk 2018-06-06 Michael Meissner <meiss...@linux.ibm.com> PR target/85657 * g++.dg/pr85657.C: Only test whether __ibm128 and long double can be used in templates. Don't check for them in overloaded functions. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797