Mercurial > hg > CbC > CbC_gcc
comparison libquadmath/strtod/mpn2flt128.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 561a7518be6b |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
32 ieee854_float128 u; | 32 ieee854_float128 u; |
33 | 33 |
34 u.ieee.negative = sign; | 34 u.ieee.negative = sign; |
35 u.ieee.exponent = expt + IEEE854_FLOAT128_BIAS; | 35 u.ieee.exponent = expt + IEEE854_FLOAT128_BIAS; |
36 #if BITS_PER_MP_LIMB == 32 | 36 #if BITS_PER_MP_LIMB == 32 |
37 u.ieee.mant_low = (((uint64_t) frac_ptr[1]) << 32) | 37 u.ieee.mantissa3 = frac_ptr[0]; |
38 | (frac_ptr[0] & 0xffffffff); | 38 u.ieee.mantissa2 = frac_ptr[1]; |
39 u.ieee.mant_high = (((uint64_t) frac_ptr[3] | 39 u.ieee.mantissa1 = frac_ptr[2]; |
40 & (((mp_limb_t) 1 << (FLT128_MANT_DIG - 96)) - 1)) | 40 u.ieee.mantissa0 = frac_ptr[3] & (((mp_limb_t) 1 |
41 << 32) | (frac_ptr[2] & 0xffffffff); | 41 << (FLT128_MANT_DIG - 96)) - 1); |
42 #elif BITS_PER_MP_LIMB == 64 | 42 #elif BITS_PER_MP_LIMB == 64 |
43 u.ieee.mant_low = frac_ptr[0]; | 43 u.ieee.mantissa3 = frac_ptr[0] & (((mp_limb_t) 1 << 32) - 1); |
44 u.ieee.mant_high = frac_ptr[1] | 44 u.ieee.mantissa2 = frac_ptr[0] >> 32; |
45 & (((mp_limb_t) 1 << (FLT128_MANT_DIG - 64)) - 1); | 45 u.ieee.mantissa1 = frac_ptr[1] & (((mp_limb_t) 1 << 32) - 1); |
46 u.ieee.mantissa0 = (frac_ptr[1] >> 32) & (((mp_limb_t) 1 | |
47 << (FLT128_MANT_DIG - 96)) - 1); | |
46 #else | 48 #else |
47 #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for" | 49 #error "mp_limb size " BITS_PER_MP_LIMB "not accounted for" |
48 #endif | 50 #endif |
49 | 51 |
50 return u.value; | 52 return u.value; |