Skip to content

Commit

Permalink
Use correct 64bit full multiplication for MinGW on ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
vejbomar committed Oct 18, 2024
1 parent 5bdbb23 commit b6c916f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint64_t>(high);
Expand Down

0 comments on commit b6c916f

Please sign in to comment.