File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1313#include < cstdint>
1414#include < type_traits>
1515#if defined(_WIN32) && defined(__GNUC__)
16- # define USE_CLZLL
16+ # define USE_BIT_LL
1717#endif
1818#ifdef pause
1919# undef pause
@@ -76,7 +76,7 @@ namespace snmalloc
7676
7777 return BITS - index - 1 ;
7878# endif
79- #elif defined(USE_CLZLL )
79+ #elif defined(USE_BIT_LL )
8080 return static_cast <size_t >(__builtin_clzll (x));
8181#else
8282 return static_cast <size_t >(__builtin_clzl (x));
@@ -142,7 +142,9 @@ namespace snmalloc
142142
143143 inline size_t ctz (size_t x)
144144 {
145- #if __has_builtin(__builtin_ctzl)
145+ #if defined(USE_BIT_LL)
146+ return static_cast <size_t >(__builtin_ctzll (x));
147+ #elif __has_builtin(__builtin_ctzl)
146148 return static_cast <size_t >(__builtin_ctzl (x));
147149#elif defined(_MSC_VER)
148150# ifdef SNMALLOC_VA_BITS_64
You can’t perform that action at this time.
0 commit comments