Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-06-24 19:56:04 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-06-24 19:56:04 +0300
commit79bfac9ca906c126032d862a6b0f27f2ca633917 (patch)
tree1cac79b8c3063504fcf1eef7a9a973ed1830db36 /server/TracyPopcnt.hpp
parent9375afdbed22fc45b4a1af0f190ece588b1e1f9e (diff)
Use proper popcnt for gcc/clang (including cygwin).
Diffstat (limited to 'server/TracyPopcnt.hpp')
-rw-r--r--server/TracyPopcnt.hpp4
1 files changed, 3 insertions, 1 deletions
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 <limits.h>
-#if defined _WIN64 || ( defined __CYGWIN__ && __WORDSIZE == 64 )
+#if defined _WIN64
# include <intrin.h>
# define TracyCountBits __popcnt64
+#elif defined __GNUC__ || defined __clang__
+# define TracyCountBits __builtin_popcountll
#else
static inline int TracyCountBits( uint64_t i )
{