This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: __float128 typeinfo
- From: Michael Meissner <meissner at linux dot vnet dot ibm dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: Jason Merrill <jason at redhat dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, meissner at linux dot vnet dot ibm dot com, ramana dot gcc at googlemail dot com
- Date: Fri, 6 Jun 2014 13:45:25 -0400
- Subject: Re: __float128 typeinfo
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1406061049520 dot 8194 at stedding dot saclay dot inria dot fr> <5391E09A dot 7010607 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1406061740590 dot 22367 at stedding dot saclay dot inria dot fr> <5391EE69 dot 4080908 at redhat dot com> <alpine dot DEB dot 2 dot 02 dot 1406061900440 dot 23287 at stedding dot saclay dot inria dot fr>
On Fri, Jun 06, 2014 at 07:21:03PM +0200, Marc Glisse wrote:
> DJ Delorie's work on __intN may be a good direction for __floatN as
> well, IIUC we will have a global list of 4 __intN types, and the
> target decides the value of N for each of them, so we can refer to
> those type nodes in common code but they are still target-specific.
> Or maybe there isn't enough variety in float types to deserve this.
One of the problems I've been having with IEEE floating point on PowerPC is the
number of bits is not the only measure. The IBM double-double format that is
currently used for long double is 128 bits as is the IEEE 128-bit floating
point. So, in theory __float128 could be used for the IBM double-double
format. There might be other places where an implementation has 2 floating
point formats of the same size.
One of the things I need to do to the basic internals, is provide an option so
that __float128 does not widen to a larger type or have smaller types widen to
it.
Another problem with the current __float128 on x86 is it isn't a base type, so
you have do something like the following:
typedef _Complex float __attribute__((mode(TC))) _Complex128;
It would be nice to have a standard name for IEEE 128-bit floating point,
whether it is a defacto standard like __float128, or something in future
standards like _Float128.
--
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797