From 9605ca6c085a749f29b6866a3e00bce1ba1a2698 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 17 Aug 2013 18:12:56 +0930 Subject: IBM long double mechanical changes to support little-endian http://sourceware.org/ml/libc-alpha/2013-07/msg00001.html This patch starts the process of supporting powerpc64 little-endian long double in glibc. IBM long double is an array of two ieee doubles, so making union ibm_extended_long_double reflect this fact is the correct way to access fields of the doubles. * sysdeps/ieee754/ldbl-128ibm/ieee754.h (union ibm_extended_long_double): Define as an array of ieee754_double. (IBM_EXTENDED_LONG_DOUBLE_BIAS): Delete. * sysdeps/ieee754/ldbl-128ibm/printf_fphex.c: Update all references to ibm_extended_long_double and IBM_EXTENDED_LONG_DOUBLE_BIAS. * sysdeps/ieee754/ldbl-128ibm/e_exp10l.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/e_expl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/ldbl2mpn.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h: Likewise. * sysdeps/ieee754/ldbl-128ibm/mpn2ldbl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/s_nearbyintl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/strtold_l.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/x2y2m1l.c: Likewise. --- sysdeps/ieee754/ldbl-128ibm/e_exp10l.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sysdeps/ieee754/ldbl-128ibm/e_exp10l.c') diff --git a/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c b/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c index 1eaf2fe..49121ca 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_exp10l.c @@ -36,9 +36,9 @@ __ieee754_exp10l (long double arg) else if (arg > LDBL_MAX_10_EXP + 1) return LDBL_MAX * LDBL_MAX; - u.d = arg; - arg_high = u.dd[0]; - arg_low = u.dd[1]; + u.ld = arg; + arg_high = u.d[0].d; + arg_low = u.d[1].d; exp_high = arg_high * log10_high; exp_low = arg_high * log10_low + arg_low * M_LN10l; return __ieee754_expl (exp_high) * __ieee754_expl (exp_low); -- cgit v1.1