From 2609d5fd4bb8751e3f734361eba3388d205eb9dd Mon Sep 17 00:00:00 2001 From: Evgeny Karpov Date: Mon, 2 Sep 2024 17:19:21 +0200 Subject: [PATCH 1/2] The patch resolves GCC compilation issues for the C++ language targeting aarch64-w64-mingw32. More information could be found here: https://gcc.gnu.org/pipermail/gcc-patches/2024-September/662020.html --- include/fast_float/float_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index ea73a199..00111d29 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -344,6 +344,8 @@ full_multiplication(uint64_t a, uint64_t b) { answer.high = __umulh(a, b); answer.low = a * b; #elif defined(FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__)) +#elif defined(FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__) \ + && !defined(_M_ARM64)) answer.low = _umul128(a, b, &answer.high); // _umul128 not available on ARM64 #elif defined(FASTFLOAT_64BIT) && defined(__SIZEOF_INT128__) __uint128_t r = ((__uint128_t)a) * b; From c9f8339668884044d915ce6fce058de3aefd2492 Mon Sep 17 00:00:00 2001 From: Evgeny Karpov Date: Mon, 2 Sep 2024 18:13:01 +0200 Subject: [PATCH 2/2] Fix the formatting and remove the previous condition --- include/fast_float/float_common.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/fast_float/float_common.h b/include/fast_float/float_common.h index 00111d29..edc163cb 100644 --- a/include/fast_float/float_common.h +++ b/include/fast_float/float_common.h @@ -343,9 +343,8 @@ 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(FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__)) -#elif defined(FASTFLOAT_32BIT) || (defined(_WIN64) && !defined(__clang__) \ - && !defined(_M_ARM64)) +#elif defined(FASTFLOAT_32BIT) || \ + (defined(_WIN64) && !defined(__clang__) && !defined(_M_ARM64)) answer.low = _umul128(a, b, &answer.high); // _umul128 not available on ARM64 #elif defined(FASTFLOAT_64BIT) && defined(__SIZEOF_INT128__) __uint128_t r = ((__uint128_t)a) * b;