Browse Source

Replaced __builtin_clz by long long version - Fixes #268

Alexis Breust 6 years ago
parent
commit
805cc48f03
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/big_int.cpp

+ 1 - 1
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
 }