From 449c6286454f0e8f864f2b67ef3dbadab3db6bef Mon Sep 17 00:00:00 2001 From: Joao Paulo Magalhaes Date: Mon, 16 Nov 2020 13:33:11 +0000 Subject: [PATCH] __emulu() is needed for mingw32 --- include/fast_float/float_common.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 93782e9..2c0c18e 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -120,10 +120,13 @@ fastfloat_really_inline int leading_zeroes(uint64_t input_num) { #if !defined(_M_X64) && !defined(_M_ARM64) // _umul128 for x86, arm // this is a slow emulation routine for 32-bit Windows -// -//fastfloat_really_inline uint64_t __emulu(uint32_t x, uint32_t y) { -// return x * (uint64_t)y; -//} + +#ifdef __MINGW32__ +fastfloat_really_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +#endif + fastfloat_really_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd);