mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-12 19:31:28 -06:00
Latte: use 32-bit version of __builtin_clz
__builtin_clzl is the 64 bit version For example for _Mask 32 it calculated 31 - 58 = -27 Cast to uint32 gives 4294967269
This commit is contained in:
parent
bc21013d21
commit
d4857e8749
@ -12,7 +12,7 @@ namespace LatteAddrLib
|
||||
{
|
||||
if (!_Mask)
|
||||
return 0;
|
||||
*_Index = 31 - __builtin_clzl(_Mask);
|
||||
*_Index = 31 - __builtin_clz(_Mask);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user