From 79bfac9ca906c126032d862a6b0f27f2ca633917 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 24 Jun 2019 18:56:04 +0200 Subject: [PATCH] Use proper popcnt for gcc/clang (including cygwin). --- server/TracyPopcnt.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/TracyPopcnt.hpp b/server/TracyPopcnt.hpp index 11d4c715..a84008d5 100644 --- a/server/TracyPopcnt.hpp +++ b/server/TracyPopcnt.hpp @@ -3,9 +3,11 @@ #include -#if defined _WIN64 || ( defined __CYGWIN__ && __WORDSIZE == 64 ) +#if defined _WIN64 # include # define TracyCountBits __popcnt64 +#elif defined __GNUC__ || defined __clang__ +# define TracyCountBits __builtin_popcountll #else static inline int TracyCountBits( uint64_t i ) {