Make cxxrtl tests work on 32-bit by using __builtin_clzll when needed
This commit is contained in:
parent
04bbd4e7e2
commit
518986d45c
@ -241,7 +241,10 @@ struct CtlzTest
|
||||
{
|
||||
if (a == 0)
|
||||
return bits;
|
||||
return __builtin_clzl(a) - (64 - bits);
|
||||
if (sizeof(long) == 4)
|
||||
return __builtin_clzll(a) - (64 - bits);
|
||||
else
|
||||
return __builtin_clzl(a) - (64 - bits);
|
||||
}
|
||||
|
||||
template<size_t Bits>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user