From efd31bd53c099d6acdb1d78957b11e1ee458f387 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Jul 2026 05:44:02 +0000 Subject: [PATCH] Fix x86 Windows build by guarding _mul128 to x64 only --- src/util/mpz.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/mpz.cpp b/src/util/mpz.cpp index 56b48f145d..edac27221b 100644 --- a/src/util/mpz.cpp +++ b/src/util/mpz.cpp @@ -34,8 +34,8 @@ static bool mul_overflows(int64_t a, int64_t b, int64_t & result) { return std::ckd_mul(&result, a, b); #elif defined(__GNUC__) return __builtin_mul_overflow(a, b, &result); -#elif defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_ARM64EC) - // MSVC exposes _mul128 on x64 targets, but not on ARM64/ARM64EC. +#elif defined(_MSC_VER) && defined(_M_X64) + // MSVC exposes _mul128 only when targeting x64. __int64 high; result = _mul128(a, b, &high); // Overflow if high bits are not the sign extension of result