From 5a71e5bc40b1faf6fdde57078faef0c8f120d7cd Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 28 Oct 2022 15:33:37 +0900 Subject: [PATCH] Don't use __umulh() with MinGW on ARM64 --- include/fast_float/float_common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 55a2e4c..2272518 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -183,8 +183,9 @@ fastfloat_really_inline uint64_t _umul128(uint64_t ab, uint64_t cd, fastfloat_really_inline value128 full_multiplication(uint64_t a, uint64_t b) { value128 answer; -#ifdef _M_ARM64 +#if defined(_M_ARM64) && !defined(__MINGW32__) // ARM64 has native support for 64-bit multiplications, no need to emulate + // But MinGW on ARM64 doesn't have native support for 64-bit multiplications answer.high = __umulh(a, b); answer.low = a * b; #elif defined(FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__))