1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Use proper popcnt for gcc/clang (including cygwin).

This commit is contained in:
Bartosz Taudul 2019-06-24 18:56:04 +02:00
parent 9375afdbed
commit 79bfac9ca9

View File

@ -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 )
{