[ARM32] cntlzwx optimization if source is immediate
This commit is contained in:
parent
9c82adb14f
commit
581ab9edec
|
@ -723,6 +723,14 @@ void JitArm::cntlzwx(UGeckoInstruction inst)
|
||||||
JITDISABLE(bJITIntegerOff);
|
JITDISABLE(bJITIntegerOff);
|
||||||
u32 a = inst.RA, s = inst.RS;
|
u32 a = inst.RA, s = inst.RS;
|
||||||
|
|
||||||
|
if (gpr.IsImm(s))
|
||||||
|
{
|
||||||
|
gpr.SetImmediate(a, __builtin_clz(gpr.GetImm(s)));
|
||||||
|
if (inst.Rc)
|
||||||
|
ComputeRC(gpr.GetImm(a), 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
gpr.BindToRegister(a, a == s);
|
gpr.BindToRegister(a, a == s);
|
||||||
ARMReg RA = gpr.R(a);
|
ARMReg RA = gpr.R(a);
|
||||||
ARMReg RS = gpr.R(s);
|
ARMReg RS = gpr.R(s);
|
||||||
|
|
Loading…
Reference in New Issue