This is the mail archive of the
mailing list for the GCC project.
Re: PowerPC IEEE 128-bit floating point: Two 128-bit floating point types
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Michael Meissner <meissner at linux dot vnet dot ibm dot com>, gcc at gcc dot gnu dot org, dje dot gcc at gmail dot com, amodra at gmail dot com, rguenther at suse dot de, jakub at redhat dot com, segher at kernel dot crashing dot org, bergner at vnet dot ibm dot com, rdsandiford at googlemail dot com, pthaugen at us dot ibm dot com, wschmidt at linux dot vnet dot ibm dot com, Ulrich dot Weigand at de dot ibm dot com, stigge at antcom dot de, vmakarov at redhat dot com, andrewd at gentrack dot com, joseph at codesourcery dot com, sjmunroe at us dot ibm dot com, nathan at codesourcery dot com, paul at codesourcery dot com, jason at redhat dot com, stigge at debian dot org, doko at ubuntu dot com, steven at gcc dot gnu dot org, dominiq at lps dot ens dot fr, acsawdey at linux dot vnet dot ibm dot com, azanella at linux dot vnet dot ibm dot com
- Date: Fri, 30 May 2014 17:33:48 -0400
- Subject: Re: PowerPC IEEE 128-bit floating point: Two 128-bit floating point types
- Authentication-results: sourceware.org; auth=none
- References: <20140530195816 dot GA28688 at ibm-tiger dot the-meissners dot org>
I assume we do not want a flag day, where the user flips a switch, and long
double is now IEEE 128-bit. That would involve having 2 sets of libraries,
etc. to work with existing programs and new programs. Even if the user does
not directly use long double, it still may be visible with the switch, since
many of the math libraries use long double internally to get more precision. I
assume that the current IBM extended double format gives better performance
than the emulation functions.
I assume the way forward is to initially have a __float128 type that gives IEEE
128-bit support for those that need/want it, and keep long double to be the
current format. When all the bits and pieces are in place, we can think about
flipping the switch. However, there we have to think about appropriate times
for distributions to change over.
In terms of calling sequence, there are 2 ways to go: Either pass/return the
IEEE 128-bit value in 2 registers (like long double is now) or treat it like a
128-bit vector. The v2 ELF abi explicitly says that it is treated like a
vector object, and I would prefer the v1 ELF on big endian server PowerPC's
also treat it like a vector. If we are building a compiler for a server
target, to prevent confusion, I think it should be a requirement that you must
have -mvsx (or at least -maltivec -mabi=altivec) to use __float128. Or do I
need to implement two sets of conversion functions, one if the user builds
his/her programs with -mcpu=power5 and the other for more recent customers?
I don't have a handle on the need for IEEE 128-bit floating point in non-server
platforms. I assume in these environments, if we need IEEE 128-bit, it will be
passed as two floating point values. Do we need this support?
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: email@example.com, phone: +1 (978) 899-4797