From b6c916f3a6f909d10611710f012e2be5cc733ecb Mon Sep 17 00:00:00 2001 From: Martin Vejbora Date: Fri, 18 Oct 2024 09:29:41 +0200 Subject: [PATCH] Use correct 64bit full multiplication for MinGW on ARM64 --- .../json/detail/charconv/detail/fast_float/float_common.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/json/detail/charconv/detail/fast_float/float_common.hpp b/include/boost/json/detail/charconv/detail/fast_float/float_common.hpp index 49ba417f1..ef3114005 100644 --- a/include/boost/json/detail/charconv/detail/fast_float/float_common.hpp +++ b/include/boost/json/detail/charconv/detail/fast_float/float_common.hpp @@ -207,7 +207,8 @@ value128 full_multiplication(uint64_t a, uint64_t b) { // But MinGW on ARM64 doesn't have native support for 64-bit multiplications answer.high = __umulh(a, b); answer.low = a * b; -#elif defined(BOOST_JSON_FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__)) +#elif defined(BOOST_JSON_FASTFLOAT_32BIT) || \ + (defined(_WIN64) && !defined(__clang__) && !defined(_M_ARM64)) unsigned long long high; answer.low = _umul128(a, b, &high); // _umul128 not available on ARM64 answer.high = static_cast(high);