diff options
author | Erik Faye-Lund <[email protected]> | 2019-08-14 22:29:24 +0200 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2019-09-02 12:45:45 +0000 |
commit | 2f82d972ab982a816009228ff62bd5c5434062ca (patch) | |
tree | e3b75970e71d246580ccba913a4f5451f5f2d2c2 /src/util/bitscan.h | |
parent | 1de9ba33a232c637121f5d2a5d0a43ff43fbb0b6 (diff) |
util: only allow _BitScanReverse64 on 64-bit cpus
While the documentation for _BitScanReverse64 on MSDN says that it's
available on ARM, this isn't true. It's only available on ARM64. So
let's match reality.
Signed-off-by: Erik Faye-Lund <[email protected]>
Acked-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/util/bitscan.h')
-rw-r--r-- | src/util/bitscan.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/bitscan.h b/src/util/bitscan.h index 02b3afda7f9..895a1e7a372 100644 --- a/src/util/bitscan.h +++ b/src/util/bitscan.h @@ -72,7 +72,7 @@ int ffs(int i); #ifdef HAVE___BUILTIN_FFSLL #define ffsll __builtin_ffsll -#elif defined(_MSC_VER) && (_M_AMD64 || _M_ARM || _M_IA64) +#elif defined(_MSC_VER) && (_M_AMD64 || _M_ARM64 || _M_IA64) static inline int ffsll(long long int i) { @@ -235,7 +235,7 @@ util_last_bit64(uint64_t u) { #if defined(HAVE___BUILTIN_CLZLL) return u == 0 ? 0 : 64 - __builtin_clzll(u); -#elif defined(_MSC_VER) && (_M_AMD64 || _M_ARM || _M_IA64) +#elif defined(_MSC_VER) && (_M_AMD64 || _M_ARM64 || _M_IA64) unsigned long index; if (_BitScanReverse64(&index, u)) return index + 1; |