Hi!
Thank you for working on this.
On Sun, Apr 15, 2018 at 03:50:44PM -0400, Michael Meissner wrote:
> PR target/85075 shows that there are some problems with the types for the 3
> 128-bit floating point types on the PowerPC:
>
> __float128 (and _Float128 in C, IEEE 128-bit)
> __ieee128 (IBM extended double)
(You mean __ibm128, right?)
> long double (either IEEE 128-bit or IBM extended double)
> In developing this patch, Segher noticed that the mangling for __float128
> violated the mangling standards. This patch includes a change to use a more
> official mangling (u10__float128).
To use a mangling that works *at all*, yeah.
> This means that GCC 8 will not be able to
> link with C++ functions that pass or return __float128 values compiled with
> GCC
> 6 or GCC 7. I have put in a warning if __float128 is mangled. The warning
> can
> be silenced by using -Wno-psabi.
It's a note, not a warning (so -Werror won't fail builds, etc.)
> In addition, when I built this on big endian system, the changes exposed a
> latent bug with the way __builtin_packlongdouble was done when it tried to
> support the first argument overlapping with the result. I have removed the
> code to support overlapping input/output for this builtin. I imagine that we
> will need to add __builtin_packieee128 and __builtin_unpackieee128 as well in
> the future (or make __builtin_{,un}packlongdouble support all three types).
Please send this part as a separate patch. It will need backports, too.
> The manglings that are now used are:
>
> For -mabi=ieeelongdouble:
>
> __float128 "u10__float128"
> __ibm128 "u8__ibm128"
> long double "u9__ieee128"
>
> For -mabi=ibmlongdouble:
>
> __float128 "u10__float128"
> __ibm128 "u8__ibm128"
> long double "g"
>
> For -mlong-double-64:
>
> __float128 "u10__float128"
> __ibm128 "u8__ibm128"
> long double "e"
If __float128 is the same type as _Float128, as which of those should
it be mangled? The C++ ABI has "DF" for _FloatN, but the demangler uses
that same code for fixed points types. Ugh.
I don't think mangling "long double" as "u9__ieee128" works well with for
example GDB.
Cc:ing Joseph Myers; Joseph, do you have any advice here?
Segher