Fix #ifdef guarding the use of __uint128_t

This commit is contained in:
Nigel Tao committed 2020-07-10 20:33:09 +10:00
1 parent bfd0655944
commit e722bb095c
3 files changed
+10 -18

No files matched your search

@@ -844,11 +844,9 @@ wuffs_base__private_implementation__parse_number_f64_eisel(uint64_t man,
// As a consequence, x_hi has either 0 or 1 leading zeroes. Shifting x_hi
// right by either 9 or 10 bits (depending on x_hi's MSB) will therefore
// leave the top 10 MSBs (bits 54 ..= 63) off and the 11th MSB (bit 53) on.
#if defined(__GNUC__)
#if defined(__SIZEOF_INT128__)
// See commit 18449ad75d582dd015c236abc85a16f333b796f3 "Optimize 128-bit muls
// in parse_number_f64_eisel" for benchmark numbers.
//
// Clang also defines "__GNUC__".
__uint128_t x =
((__uint128_t)man) * (((uint64_t)po10[2]) | (((uint64_t)po10[3]) << 32));
uint64_t x_hi = ((uint64_t)(x >> 64));
@@ -874,11 +872,9 @@ wuffs_base__private_implementation__parse_number_f64_eisel(uint64_t man,
// a "low resolution" 64-bit mantissa. Now use a "high resolution" 128-bit
// mantissa. We've already calculated x = (man * bits_0_to_63_incl_of_e).
// Now calculate y = (man * bits_64_to_127_incl_of_e).
#if defined(__GNUC__)
#if defined(__SIZEOF_INT128__)
// See commit 18449ad75d582dd015c236abc85a16f333b796f3 "Optimize 128-bit
// muls in parse_number_f64_eisel" for benchmark numbers.
//
// Clang also defines "__GNUC__".
__uint128_t y = ((__uint128_t)man) *
(((uint64_t)po10[0]) | (((uint64_t)po10[1]) << 32));
uint64_t y_hi = ((uint64_t)(y >> 64));