From eb6085d99ad7a55207260a25c606075c91756ad5 Mon Sep 17 00:00:00 2001 From: Laurent GIORELLO Date: Fri, 10 Nov 2023 02:44:17 +0000 Subject: [PATCH] Only use asm on x64 for umul128 with GCC and CLANG --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 4b65f7a0..fbdd06c2 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1486,7 +1486,7 @@ template class to_utf8 { // Computes 128-bit result of multiplication of two 64-bit unsigned integers. inline uint128_fallback umul128(uint64_t x, uint64_t y) noexcept { -#if __x86_64__ +#if __x86_64__ && (__GNUC__ || __clang__) uint64_t hi, lo; __asm__( "mulq %[y] \n" : "=a"(lo), "=d"(hi)