diff options
author | Nathan Moinvaziri <nathan@nathanm.com> | 2020-08-15 20:45:41 -0700 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2020-08-20 12:05:11 +0200 |
commit | d8aeacbfa285556fccef8f01af68bf02f1e671b0 (patch) | |
tree | 4de4362915bb799f88d4da1e2c17cb88fbd05eb9 /fallback_builtins.h | |
parent | 9fccbde10c91295a74df6363b4e08259b0d855f0 (diff) |
Harmonize the CPU architecture preprocessor definitions.
Diffstat (limited to 'fallback_builtins.h')
-rw-r--r-- | fallback_builtins.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fallback_builtins.h b/fallback_builtins.h index f855792..314ad32 100644 --- a/fallback_builtins.h +++ b/fallback_builtins.h @@ -5,7 +5,7 @@ #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) || defined(_M_ARM) || defined(_M_ARM64) #include <intrin.h> -#ifdef X86_CPUID +#ifdef X86_FEATURES # include "arch/x86/x86.h" #endif @@ -13,7 +13,7 @@ * Because of that assumption trailing_zero is not initialized and the return value of _BitScanForward is not checked */ static __forceinline unsigned long __builtin_ctz(uint32_t value) { -#ifdef X86_CPUID +#ifdef X86_FEATURES if (x86_cpu_has_tzcnt) return _tzcnt_u32(value); #endif @@ -28,7 +28,7 @@ static __forceinline unsigned long __builtin_ctz(uint32_t value) { * Because of that assumption trailing_zero is not initialized and the return value of _BitScanForward64 is not checked */ static __forceinline unsigned long long __builtin_ctzll(uint64_t value) { -#ifdef X86_CPUID +#ifdef X86_FEATURES if (x86_cpu_has_tzcnt) return _tzcnt_u64(value); #endif |