34 #ifndef RYU_D2S_INTRINSICS_H
35 #define RYU_D2S_INTRINSICS_H
37 #if defined(HAS_64_BIT_INTRINSICS)
44 return _umul128(
a,
b, productHi);
59 return __shiftright128(lo, hi, (
unsigned char) dist);
84 const uint64 mid1 = b10 + b00Hi;
88 const uint64 mid2 = b01 + mid1Lo;
92 const uint64 pHi = b11 + mid1Hi + mid2Hi;
104 #if !defined(RYU_32_BIT_PLATFORM)
106 return (hi << (64 - dist)) | (lo >> dist);
110 return (hi << (64 - dist)) | ((
uint32) (lo >> 32) >> (dist - 32));
116 #ifdef RYU_32_BIT_PLATFORM
165 return umulh(
x >> 2,
UINT64CONST(0x28F5C28F5C28F5C3)) >> 2;
197 return x / 100000000;
#define Assert(condition)
static uint64 div1e8(const uint64 x)
static uint64 div10(const uint64 x)
static uint64 umul128(const uint64 a, const uint64 b, uint64 *const productHi)
static uint64 div5(const uint64 x)
static uint64 shiftright128(const uint64 lo, const uint64 hi, const uint32 dist)
static uint64 div100(const uint64 x)