diff options
Diffstat (limited to 'libquadmath/printf')
-rw-r--r-- | libquadmath/printf/flt1282mpn.c | 12 | ||||
-rw-r--r-- | libquadmath/printf/printf_fphex.c | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/libquadmath/printf/flt1282mpn.c b/libquadmath/printf/flt1282mpn.c index 0105314..a9a4c4f 100644 --- a/libquadmath/printf/flt1282mpn.c +++ b/libquadmath/printf/flt1282mpn.c @@ -39,14 +39,14 @@ mpn_extract_flt128 (mp_ptr res_ptr, mp_size_t size, *expt = (int) u.ieee.exponent - IEEE854_FLOAT128_BIAS; #if BITS_PER_MP_LIMB == 32 - res_ptr[0] = u.ieee.mant_low; /* Low-order 32 bits of fraction. */ - res_ptr[1] = (u.ieee.mant_low >> 32); - res_ptr[2] = u.ieee.mant_high; - res_ptr[3] = (u.ieee.mant_high >> 32); /* High-order 32 bits. */ + res_ptr[0] = u.ieee.mantissa3; /* Low-order 32 bits of fraction. */ + res_ptr[1] = u.ieee.mantissa2; + res_ptr[2] = u.ieee.mantissa1; + res_ptr[3] = u.ieee.mantissa0; /* High-order 32 bits. */ #define N 4 #elif BITS_PER_MP_LIMB == 64 - res_ptr[0] = u.ieee.mant_low; - res_ptr[1] = u.ieee.mant_high; + res_ptr[0] = ((mp_limb_t) u.ieee.mantissa2 << 32) | u.ieee.mantissa3; + res_ptr[1] = ((mp_limb_t) u.ieee.mantissa0 << 32) | u.ieee.mantissa1; #define N 2 #else #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for" diff --git a/libquadmath/printf/printf_fphex.c b/libquadmath/printf/printf_fphex.c index fc960f3..a40a6b0 100644 --- a/libquadmath/printf/printf_fphex.c +++ b/libquadmath/printf/printf_fphex.c @@ -235,8 +235,10 @@ __quadmath_printf_fphex (struct __quadmath_printf_file *fp, assert (sizeof (long double) == 16); - num0 = fpnum.ieee.mant_high; - num1 = fpnum.ieee.mant_low; + num0 = (((unsigned long long int) fpnum.ieee.mantissa0) << 32 + | fpnum.ieee.mantissa1); + num1 = (((unsigned long long int) fpnum.ieee.mantissa2) << 32 + | fpnum.ieee.mantissa3); zero_mantissa = (num0|num1) == 0; |