This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: PATCH: Fix wcstold and wcstold_l


On Wed, Mar 10, 2004 at 02:59:42PM -0800, Ulrich Drepper wrote:
> H. J. Lu wrote:
> > This patch tries to fix:
> > 
> > http://sources.redhat.com/bugzilla/show_bug.cgi?id=66
> 
> What are you talking about?  Which platform has to use 128bit floats?

I saw

sysdeps/hppa/hppa1.1/Implies:ieee754/ldbl-128
sysdeps/mips/mips64/n32/Implies:ieee754/ldbl-128
sysdeps/mips/mips64/n64/Implies:ieee754/ldbl-128
sysdeps/sparc/sparc64/Implies:ieee754/ldbl-128

There is only one wcstold.c under wcsmbs, which is used on all
platforms. It has

# define SET_MANTISSA(flt, mant) \
  do { union ieee854_long_double u;					      \

       u.d = (flt);							      \

       if ((mant & 0x7fffffffffffffffULL) == 0) 			      \

	 mant = 0x4000000000000000ULL;					      \

       u.ieee.mantissa0 = (((mant) >> 32) & 0x7fffffff) | 0x80000000;	      \

       u.ieee.mantissa1 = (mant) & 0xffffffff;				      \

       (flt) = u.d;							      \

  } while (0)

But it is for 96bit IEEE long double and won't work for 128bit IEEE
long double.


H.J.


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