On Wed, May 30, 2018 at 12:58:49PM +0000, Segher Boessenkool wrote: > This patch changes the (C++) mangling of the 128-bit float types: > > __ieee128 becomes u9__ieee128 > __ibm128 becomes u8__ieee128
__ibm128 becomes u8__ibm128 of course. > __float128 is not a type anymore > IEEE long double becomes u9__ieee128 > IBM long double stays g > > This is a necessary ABI break. It will need backporting to 8, too. > > Bootstrapped and tested on powerpc64-linux {-m32,-m64} (Power7) and > on powerpc64le-linux (Power9). Also tested manually; testsuite > patches will follow soon. > > I'll commit this later today if nothing comes up. > > > Segher > > > 2018-05-30 Segher Boessenkool <seg...@kernel.crashing.org> > > * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of > the 128-bit floating point types. > > --- > gcc/config/rs6000/rs6000.c | 27 +++++++++++---------------- > 1 file changed, 11 insertions(+), 16 deletions(-) > > diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c > index fab8ee3..f140816 100644 > --- a/gcc/config/rs6000/rs6000.c > +++ b/gcc/config/rs6000/rs6000.c > @@ -32001,21 +32001,6 @@ rs6000_mangle_type (const_tree type) > if (type == bool_int_type_node) return "U6__booli"; > if (type == bool_long_long_type_node) return "U6__boolx"; > > - /* Use a unique name for __float128 rather than trying to use "e" or "g". > Use > - "g" for IBM extended double, no matter whether it is long double (using > - -mabi=ibmlongdouble) or the distinct __ibm128 type. */ > - if (TARGET_FLOAT128_TYPE) > - { > - if (type == ieee128_float_type_node) > - return "U10__float128"; > - > - if (type == ibm128_float_type_node) > - return "u8__ibm128"; > - > - if (TARGET_LONG_DOUBLE_128 && type == long_double_type_node) > - return (TARGET_IEEEQUAD) ? "U10__float128" : "g"; > - } > - > /* Mangle IBM extended float long double as `g' (__float128) on > powerpc*-linux where long-double-64 previously was the default. */ > if (TYPE_MAIN_VARIANT (type) == long_double_type_node > @@ -32024,7 +32009,17 @@ rs6000_mangle_type (const_tree type) > && !TARGET_IEEEQUAD) > return "g"; > > - /* For all other types, use normal C++ mangling. */ > + if (TARGET_FLOAT128_TYPE) > + { > + if (type == ieee128_float_type_node > + || (type == long_double_type_node && TARGET_LONG_DOUBLE_128)) > + return "u9__ieee128"; > + > + if (type == ibm128_float_type_node) > + return "u8__ibm128"; > + } > + > + /* For all other types, use the default mangling. */ > return NULL; > } > > -- > 1.8.3.1