This is the mail archive of the
mailing list for the GCC project.
Re: PowerPC IEEE 128-bit floating point: Language standards
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 2 Jun 2014 21:53:34 +0000
- Subject: Re: PowerPC IEEE 128-bit floating point: Language standards
- Authentication-results: sourceware.org; auth=none
- References: <20140530195816 dot GA28688 at ibm-tiger dot the-meissners dot org> <20140602154535 dot GA14850 at ibm-tiger dot the-meissners dot org>
On Mon, 2 Jun 2014, Michael Meissner wrote:
> I have not been following the language standards recently. For any of the
> recent language standards, or the standards that are being worked on, will
> there be requirements for an IEEE 128-bit binary floating point type? For the
> C/C++ languages, is this type long double, or is another type being proprosed
> (such as __float128)?
See DTS 18661-3 (WG14 N1834) - supposed to be going for PDTS ballot soon.
This provides a standard set of C bindings for types corresponding to
particular IEEE formats, without requiring such types to be provided.
(Thus, it provides a standard way of doing what libquadmath does - saying
the type is _Float128, that that's a keyword so it can be used with
_Complex (cf. bug 32187), that the library functions are *f128, that
constants can be suffixed with f128, that _Float64 is a distinct type from
double although it has the same representation and alignment, and so on.
Obviously it's not your responsibility to implement any of this. But you
may need to do some of the same disentangling in glibc that would be
needed for implementing 18661-3 - the ldbl-128 and ldbl-128ibm directories
presently have the mutually exclusive meanings that long double is a
particular type, but you'll want to build code from both of them into the
same glibc if the transition is to be achieved without having two separate
sets of incompatible glibc libraries. Though separate libraries, with
some dynamic linker magic to pick the right ones and avoid duplicating
any libraries that don't involve long double in their interfaces, does
have some attraction.)
Joseph S. Myers