mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Jit_Integer: Use Common::CountLeadingZeros in cntlzwx
This commit is contained in:
@ -1956,14 +1956,7 @@ void Jit64::cntlzwx(UGeckoInstruction inst)
|
||||
|
||||
if (gpr.IsImm(s))
|
||||
{
|
||||
u32 mask = 0x80000000;
|
||||
u32 i = 0;
|
||||
for (; i < 32; i++, mask >>= 1)
|
||||
{
|
||||
if (gpr.Imm32(s) & mask)
|
||||
break;
|
||||
}
|
||||
gpr.SetImmediate32(a, i);
|
||||
gpr.SetImmediate32(a, Common::CountLeadingZeros(gpr.Imm32(s)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user