Jit_Integer: Use Common::CountLeadingZeros in cntlzwx
This commit is contained in:
parent
7e9824611e
commit
e415580f54
|
@ -1956,14 +1956,7 @@ void Jit64::cntlzwx(UGeckoInstruction inst)
|
||||||
|
|
||||||
if (gpr.IsImm(s))
|
if (gpr.IsImm(s))
|
||||||
{
|
{
|
||||||
u32 mask = 0x80000000;
|
gpr.SetImmediate32(a, Common::CountLeadingZeros(gpr.Imm32(s)));
|
||||||
u32 i = 0;
|
|
||||||
for (; i < 32; i++, mask >>= 1)
|
|
||||||
{
|
|
||||||
if (gpr.Imm32(s) & mask)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
gpr.SetImmediate32(a, i);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue