diff --git a/include/fast_io_core_impl/intrinsics/carry.h b/include/fast_io_core_impl/intrinsics/carry.h index 41cffbfe..918ea80a 100644 --- a/include/fast_io_core_impl/intrinsics/carry.h +++ b/include/fast_io_core_impl/intrinsics/carry.h @@ -26,7 +26,7 @@ inline constexpr T addc(T a, T b, bool carryin, bool &carryout) noexcept if (!__builtin_is_constant_evaluated()) #endif { -#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_IX86) || defined(_M_AMD64)) +#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_IX86) || defined(_M_AMD64)) && !defined(__arm64ec__) && !defined(_M_ARM64EC) #if !__has_cpp_attribute(assume) __assume(carryin == 0 || carryin == 1); #endif @@ -104,7 +104,7 @@ inline constexpr T subc(T a, T b, bool carryin, bool &carryout) noexcept if (!__builtin_is_constant_evaluated()) #endif { -#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_IX86) || defined(_M_AMD64)) +#if defined(_MSC_VER) && !defined(__clang__) && (defined(_M_IX86) || defined(_M_AMD64)) && !defined(__arm64ec__) && !defined(_M_ARM64EC) #if !__has_cpp_attribute(assume) __assume(carryin == 0 || carryin == 1); #endif diff --git a/include/fast_io_core_impl/intrinsics/msvc/impl.h b/include/fast_io_core_impl/intrinsics/msvc/impl.h index 1e073419..1f0ce5a9 100644 --- a/include/fast_io_core_impl/intrinsics/msvc/impl.h +++ b/include/fast_io_core_impl/intrinsics/msvc/impl.h @@ -1,7 +1,9 @@ #pragma once #if defined(_MSC_VER) && !defined(__clang__) +#if !defined(_M_ARM64EC) #include "x86.h" +#endif #include "arm.h" #include "common.h" #endif diff --git a/include/fast_io_core_impl/intrinsics/udivmod.h b/include/fast_io_core_impl/intrinsics/udivmod.h index 20df39da..fb1632c6 100644 --- a/include/fast_io_core_impl/intrinsics/udivmod.h +++ b/include/fast_io_core_impl/intrinsics/udivmod.h @@ -26,7 +26,7 @@ Referenced from template inline constexpr tuint udivbigbysmalltosmalldefault(T u1, T u0, T v) noexcept { -#if (defined(__x86_64__) || defined(_M_AMD64)) && !defined(__arm64ec__) +#if (defined(__x86_64__) || defined(_M_AMD64)) && !defined(__arm64ec__) && !defined(_M_ARM64EC) if constexpr (sizeof(T) == sizeof(::std::uint_least64_t)) { #if defined(__cpp_if_consteval) @@ -112,7 +112,7 @@ inline constexpr tuint udivbigbysmalltosmalldefault(T u1, T u0, T v) noexcept template inline constexpr T shiftleft(T low, T high, unsigned shift) noexcept { -#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_AMD64) +#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_AMD64) && !defined(__arm64ec__) && !defined(_M_ARM64EC) if constexpr (sizeof(T) == sizeof(long long unsigned)) { #if defined(__cpp_if_consteval) @@ -137,7 +137,7 @@ inline constexpr T shiftleft(T low, T high, unsigned shift) noexcept template inline constexpr T shiftright(T low, T high, unsigned shift) noexcept { -#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_AMD64) +#if defined(_MSC_VER) && !defined(__clang__) && defined(_M_AMD64) && !defined(__arm64ec__) && !defined(_M_ARM64EC) if constexpr (sizeof(T) == sizeof(long long unsigned)) { #if defined(__cpp_if_consteval) diff --git a/include/fast_io_core_impl/intrinsics/umul.h b/include/fast_io_core_impl/intrinsics/umul.h index 36917883..35840e76 100644 --- a/include/fast_io_core_impl/intrinsics/umul.h +++ b/include/fast_io_core_impl/intrinsics/umul.h @@ -418,7 +418,7 @@ inline constexpr T umul(U a, T b, U &high) noexcept return static_cast(res); } } -#elif defined(_MSC_VER) && defined(_M_X64) +#elif defined(_MSC_VER) && defined(_M_X64) && !defined(__arm64ec__) && !defined(_M_ARM64EC) #if defined(__cpp_lib_is_constant_evaluated) || defined(__cpp_if_consteval) #if defined(__cpp_if_consteval) if consteval @@ -526,7 +526,7 @@ inline constexpr U umulh(U a, T b) noexcept return static_cast(res >> 64u); } } -#elif defined(_MSC_VER) && defined(_M_X64) +#elif defined(_MSC_VER) && defined(_M_X64) && !defined(__arm64ec__) && !defined(_M_ARM64EC) #if defined(__cpp_lib_is_constant_evaluated) || defined(__cpp_if_consteval) #if defined(__cpp_if_consteval) if consteval