Skip to content

Commit

Permalink
libstdc++: Support aarch64-w64-mingw32 target in fast_float
Browse files Browse the repository at this point in the history
This patch resolves the GCC compilation issue for the C++ language
targeting aarch64-w64-mingw32.

The change in fast_float has been upstreamed.
fastfloat/fast_float#269

libstdc++-v3/ChangeLog:

	* src/c++17/fast_float/fast_float.h (full_multiplication):
	Support aarch64-w64-mingw32 target.
  • Loading branch information
eukarpov committed Sep 3, 2024
1 parent 2abc3be commit 3e110b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libstdc++-v3/src/c++17/fast_float/fast_float.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ fastfloat_really_inline value128 full_multiplication(uint64_t a,
// 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))
answer.low = _umul128(a, b, &answer.high); // _umul128 not available on ARM64
#elif defined(FASTFLOAT_64BIT)
__uint128_t r = ((__uint128_t)a) * b;
Expand Down

0 comments on commit 3e110b5

Please sign in to comment.