diff --git a/headers/common.h b/headers/common.h index 8548571..b1c97b5 100644 --- a/headers/common.h +++ b/headers/common.h @@ -50,7 +50,7 @@ #include #include -#if (defined(_M_X64) || defined(_M_AMD64)) +#if (defined(_M_IX86) || defined(_M_AMD64)) #include #elif defined(_M_ARM64) #include diff --git a/headers/cpubenchmark.h b/headers/cpubenchmark.h index 7640447..ea5ebf7 100644 --- a/headers/cpubenchmark.h +++ b/headers/cpubenchmark.h @@ -42,7 +42,7 @@ static __inline__ unsigned long long stopRDTSCP(void) { "%rdx"); return (static_cast(cycles_high) << 32) | cycles_low; } -#elif (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) +#elif (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))) static inline unsigned long long startRDTSC(void) { return __rdtsc(); } diff --git a/headers/simdgroupsimple.h b/headers/simdgroupsimple.h index 67adce3..63a2b30 100644 --- a/headers/simdgroupsimple.h +++ b/headers/simdgroupsimple.h @@ -152,7 +152,7 @@ namespace FastPForLib { * efficiency is not that crucial here. */ -#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) +#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))) inline static void comprIncompleteBlock(const uint8_t &n, const __m128i *&in, __m128i *&out) { @@ -627,7 +627,7 @@ namespace FastPForLib { * efficiency is not that crucial here. */ -#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) +#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))) inline static void decomprIncompleteBlock(const uint8_t &n, const __m128i *&in, diff --git a/src/simdbitpacking.cpp b/src/simdbitpacking.cpp index e552c9b..49a8930 100644 --- a/src/simdbitpacking.cpp +++ b/src/simdbitpacking.cpp @@ -8930,7 +8930,7 @@ static void __SIMD_fastunpack1_32(const __m128i *__restrict__ in, __m128i InReg2 = InReg1; __m128i OutReg1, OutReg2, OutReg3, OutReg4; const __m128i mask = _mm_set1_epi32(1); -#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) || (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) +#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))) unsigned shift = 0; for (unsigned i = 0; i < 8; ++i) { diff --git a/src/simdunalignedbitpacking.cpp b/src/simdunalignedbitpacking.cpp index 21627f3..5e3646e 100644 --- a/src/simdunalignedbitpacking.cpp +++ b/src/simdunalignedbitpacking.cpp @@ -8930,7 +8930,7 @@ static void __SIMD_fastunpack1_32(const __m128i *__restrict__ in, __m128i InReg2 = InReg1; __m128i OutReg1, OutReg2, OutReg3, OutReg4; const __m128i mask = _mm_set1_epi32(1); -#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) +#if (defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))) || (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64))) unsigned shift = 0; for (unsigned i = 0; i < 8; ++i) { diff --git a/src/streamvbyte.c b/src/streamvbyte.c index c3ee935..fafcbe9 100644 --- a/src/streamvbyte.c +++ b/src/streamvbyte.c @@ -6,31 +6,31 @@ // no particular alignment is assumed or guaranteed for any elements #if defined(_MSC_VER) - /* Microsoft C/C++-compatible compiler */ - #if (defined(_M_X64) || defined(_M_AMD64)) - #include - #elif defined(_M_ARM64) - #include - #endif - - #include - #include - #define __restrict__ __restrict + /* Microsoft C/C++-compatible compiler */ + #if (defined(_M_IX86) || defined(_M_AMD64)) + #include + #elif defined(_M_ARM64) + #include + #endif + + #include + #include + #define __restrict__ __restrict #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) - /* GCC-compatible compiler, targeting x86/x86-64 */ - #include + /* GCC-compatible compiler, targeting x86/x86-64 */ + #include #elif defined(__aarch64__) - /* GCC-compatible compiler, targeting ARM with NEON */ - #include + /* GCC-compatible compiler, targeting ARM with NEON */ + #include #elif defined(__GNUC__) && defined(__IWMMXT__) - /* GCC-compatible compiler, targeting ARM with WMMX */ - #include + /* GCC-compatible compiler, targeting ARM with WMMX */ + #include #elif (defined(__GNUC__) || defined(__xlC__)) && (defined(__VEC__) || defined(__ALTIVEC__)) - /* XLC or GCC-compatible compiler, targeting PowerPC with VMX/VSX */ - #include + /* XLC or GCC-compatible compiler, targeting PowerPC with VMX/VSX */ + #include #elif defined(__GNUC__) && defined(__SPE__) - /* GCC-compatible compiler, targeting PowerPC with SPE */ - #include + /* GCC-compatible compiler, targeting PowerPC with SPE */ + #include #endif #include diff --git a/src/varintdecode.c b/src/varintdecode.c index 7a0c743..9fc718d 100644 --- a/src/varintdecode.c +++ b/src/varintdecode.c @@ -5,27 +5,27 @@ #if defined(_MSC_VER) /* Microsoft C/C++-compatible compiler */ - #if (defined(_M_X64) || defined(_M_AMD64)) + #if (defined(_M_IX86) || defined(_M_AMD64)) #include #elif defined(_M_ARM64) #include #endif #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) - /* GCC-compatible compiler, targeting x86/x86-64 */ - #include + /* GCC-compatible compiler, targeting x86/x86-64 */ + #include #elif defined(__aarch64__) - /* GCC-compatible compiler, targeting ARM with NEON */ - #include + /* GCC-compatible compiler, targeting ARM with NEON */ + #include #elif defined(__GNUC__) && defined(__IWMMXT__) - /* GCC-compatible compiler, targeting ARM with WMMX */ - #include + /* GCC-compatible compiler, targeting ARM with WMMX */ + #include #elif (defined(__GNUC__) || defined(__xlC__)) && (defined(__VEC__) || defined(__ALTIVEC__)) - /* XLC or GCC-compatible compiler, targeting PowerPC with VMX/VSX */ - #include + /* XLC or GCC-compatible compiler, targeting PowerPC with VMX/VSX */ + #include #elif defined(__GNUC__) && defined(__SPE__) - /* GCC-compatible compiler, targeting PowerPC with SPE */ - #include + /* GCC-compatible compiler, targeting PowerPC with SPE */ + #include #endif #include