Resend: Potential upcoming changes in mangling to PowerPC GCC

Tulio Magno Quites Machado Filho tuliom@linux.ibm.com
Wed Aug 10 21:38:14 GMT 2022


Segher Boessenkool <segher@kernel.crashing.org> writes:

> You can write
> 	double convert (__ibm128  x) { return x; }
> 	double convert (__ieee128 x) { return x; }
> as well.  "__ieee128" and "long double" are the same type then (and the
> same as _Float128 and __float128 as well).

Oh! I see.  Thanks!

Going back to Mike's original question:

>> But in changing the mangling, we have the potential to create compatibility
>> issues, of code compiled with previous GCC's that use explicit __ibm128 and
>> __float128 keywords.  I don't how the users of these keywords (i.e. typically
>> libstdc++ and glibc developers, but potentially others as well).

In glibc, we use __ibm128 only once in a place that always has to be
double-double regardless of the long double type.
Everywhere else, when a double-double type is expected, long double is used.
This is also how glibc users are expected to use double-double functions from
glibc.

Meanwhile, _Float128/_float128 is used everywhere along with long double,
regardless if long double is double-double or __float128.

With that said, glibc code was designed with this in mind (thanks Joseph!), but
AFAIK nobody ever tested building glibc for ppc64le with the proposal you have
here.

If this proposal is adopted, we'd need a way to distinguish between the previous
and the new behavior, i.e. a macro.

Anyway, I believe that a newer GCC will have trouble compiling on a
system with an older glibc.
An older glibc will also have trouble building with a newer GCC, but that might
be less important.

Likewise for libdfp.

-- 
Tulio Magno


More information about the Libc-alpha mailing list