diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2018-10-08 09:39:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-08 09:39:43 +0100 |
| commit | 9623e5e032b078d546fee5e8ee9b23e9107a15eb (patch) | |
| tree | b7154b709f8f24cdae57aee6bffbec950994454f /src | |
| parent | 1a4e25f14149428ff19f2da239abe54ff0083632 (diff) | |
| parent | 805cc48f03a80b726a8b79fa19fe4a4528223553 (diff) | |
Merge pull request #270 from Breush/263-bugfix-leading-zeros-count
Replaced __builtin_clz by long long version
Diffstat (limited to 'src')
| -rw-r--r-- | src/big_int.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/big_int.cpp b/src/big_int.cpp index 42d28d28c..be4f2cdc1 100644 --- a/src/big_int.cpp +++ b/src/big_int.cpp @@ -735,7 +735,7 @@ u64 leading_zeros_u64(u64 x) { #if defined(GB_COMPILER_MSVC) return __lzcnt64(x); #else - return cast(u64)__builtin_clz(cast(unsigned long long)x); + return cast(u64)__builtin_clzll(cast(unsigned long long)x); #endif } |