This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __float128 typeinfo


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]