mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Use tzcnt instead of bsf.
This commit is contained in:
parent
7a6141389c
commit
47dfddedfd
@ -128,7 +128,23 @@ static Counts& counts() {
|
||||
#endif
|
||||
|
||||
// count leading/trailing bits
|
||||
#if defined __i386 || defined _M_IX86 || defined __x86_64__ || defined _M_X64
|
||||
# ifdef _MSC_VER
|
||||
# include <intrin.h>
|
||||
# else
|
||||
# include <x86intrin.h>
|
||||
# endif
|
||||
# if ROBIN_HOOD(BITNESS) == 32
|
||||
# define ROBIN_HOOD_PRIVATE_DEFINITION_CTZ() _tzcnt_u32
|
||||
# else
|
||||
# define ROBIN_HOOD_PRIVATE_DEFINITION_CTZ() _tzcnt_u64
|
||||
# endif
|
||||
# ifdef __AVX2__
|
||||
# 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))
|
||||
# endif
|
||||
#elif defined _MSC_VER
|
||||
# if ROBIN_HOOD(BITNESS) == 32
|
||||
# define ROBIN_HOOD_PRIVATE_DEFINITION_BITSCANFORWARD() _BitScanForward
|
||||
# else
|
||||
|
Loading…
Reference in New Issue
Block a user