Only use asm on x64 for umul128 with GCC and CLANG

This commit is contained in:
Laurent GIORELLO 2023-11-10 02:44:17 +00:00
parent 00412e6bf8
commit eb6085d99a

View File

@ -1486,7 +1486,7 @@ template <typename WChar, typename Buffer = memory_buffer> 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)