mirror of
https://github.com/fmtlib/fmt.git
synced 2026-02-16 07:09:58 +08:00
Use _M_AMD64 instead of legacy _M_X64
This commit is contained in:
parent
04864b1111
commit
0e078f6ed0
@ -403,7 +403,7 @@ class uint128_fallback {
|
|||||||
auto carry = __builtin_ia32_addcarryx_u64(0, lo_, n, &result);
|
auto carry = __builtin_ia32_addcarryx_u64(0, lo_, n, &result);
|
||||||
lo_ = result;
|
lo_ = result;
|
||||||
hi_ += carry;
|
hi_ += carry;
|
||||||
#elif defined(_MSC_VER) && defined(_M_X64)
|
#elif defined(_MSC_VER) && defined(_M_AMD64)
|
||||||
auto carry = _addcarry_u64(0, lo_, n, &lo_);
|
auto carry = _addcarry_u64(0, lo_, n, &lo_);
|
||||||
_addcarry_u64(carry, hi_, 0, &hi_);
|
_addcarry_u64(carry, hi_, 0, &hi_);
|
||||||
#else
|
#else
|
||||||
@ -1425,7 +1425,7 @@ FMT_INLINE auto umul128(uint64_t x, uint64_t y) noexcept -> uint128_fallback {
|
|||||||
#if FMT_USE_INT128
|
#if FMT_USE_INT128
|
||||||
auto p = static_cast<uint128_opt>(x) * static_cast<uint128_opt>(y);
|
auto p = static_cast<uint128_opt>(x) * static_cast<uint128_opt>(y);
|
||||||
return {static_cast<uint64_t>(p >> 64), static_cast<uint64_t>(p)};
|
return {static_cast<uint64_t>(p >> 64), static_cast<uint64_t>(p)};
|
||||||
#elif defined(_MSC_VER) && defined(_M_X64)
|
#elif defined(_MSC_VER) && defined(_M_AMD64)
|
||||||
auto hi = uint64_t();
|
auto hi = uint64_t();
|
||||||
auto lo = _umul128(x, y, &hi);
|
auto lo = _umul128(x, y, &hi);
|
||||||
return {hi, lo};
|
return {hi, lo};
|
||||||
@ -1468,7 +1468,7 @@ inline auto umul128_upper64(uint64_t x, uint64_t y) noexcept -> uint64_t {
|
|||||||
#if FMT_USE_INT128
|
#if FMT_USE_INT128
|
||||||
auto p = static_cast<uint128_opt>(x) * static_cast<uint128_opt>(y);
|
auto p = static_cast<uint128_opt>(x) * static_cast<uint128_opt>(y);
|
||||||
return static_cast<uint64_t>(p >> 64);
|
return static_cast<uint64_t>(p >> 64);
|
||||||
#elif defined(_MSC_VER) && defined(_M_X64)
|
#elif defined(_MSC_VER) && defined(_M_AMD64)
|
||||||
return __umulh(x, y);
|
return __umulh(x, y);
|
||||||
#else
|
#else
|
||||||
return umul128(x, y).high();
|
return umul128(x, y).high();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user