From c5075072339f5652e7143b7d4042ccc1ce5107ef Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 16 Jun 2020 20:14:59 +0200 Subject: [PATCH] Fix gcc/clang. --- server/tracy_robin_hood.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/tracy_robin_hood.h b/server/tracy_robin_hood.h index 553e386c..46cc4d52 100644 --- a/server/tracy_robin_hood.h +++ b/server/tracy_robin_hood.h @@ -128,7 +128,7 @@ static Counts& counts() { #endif // count leading/trailing bits -#if defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64 +#if ( ( defined __i386 || defined __x86_64__ ) && defined __BMI__ ) || defined _M_IX86 || defined _M_X64 # ifdef _MSC_VER # include # else @@ -139,7 +139,7 @@ static Counts& counts() { # else # define ROBIN_HOOD_PRIVATE_DEFINITION_CTZ() _tzcnt_u64 # endif -# ifdef __AVX2__ +# if defined __AVX2__ || defined __BMI__ # define ROBIN_HOOD_COUNT_TRAILING_ZEROES(x) ROBIN_HOOD(CTZ)(x) # else # define ROBIN_HOOD_COUNT_TRAILING_ZEROES(x) ((x) ? ROBIN_HOOD(CTZ)(x) : ROBIN_HOOD(BITNESS))