mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -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))
|
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
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user