bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: powerpc64le-linux long double math test failures


From: Alan Modra
Subject: Re: powerpc64le-linux long double math test failures
Date: Wed, 18 Dec 2013 08:26:47 +1030
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Dec 14, 2013 at 10:13:29PM +0100, Ulrich Weigand wrote:
> I'm wondering now what the best way to fix this would be.  I'm a little bit
> confused about the original intentions of the test, however.  Why does it
> attempt to move to another word?  If it simply attempted to set the
> *second* highest mantissa bit, everything would work out OK.   And if it
> does move to another word, why the NWORDS / 2 test?  Should we trust the
> gl_BIGENDIAN macro instead?

I would say "LDBL_EXPBIT0_WORD < NWORDS / 2" is testing for floating
point endianness (which seemingly can be different to integer
endianness, at least it looks that way from code in gcc).  Now gcc has
predefined macros to test for exactly that, so..

#ifdef __FLOAT_WORD_ORDER__
#define FLOAT_BIG_ENDIAN (__FLOAT_WORD_ORDER__ != __ORDER_LITTLE_ENDIAN__)
#else
#define FLOAT_BIG_ENDIAN (LDBL_EXPBIT0_WORD < NWORDS / 2)
#endif

then use FLOAT_BIG_ENDIAN everywhere you see LDBL_EXPBIT0_WORD < NWORDS / 2

> Or should the test simply hardcode the information about the IBM double
> double format, and treat the first half as 64-bit IEEE double?
> 
> I'd be happy to come up with a patch, but I'd appreciate some guidance what
> direction it should take.

-- 
Alan Modra
Australia Development Lab, IBM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]