[ARM32] cntlzwx optimization if source is immediate

This commit is contained in:
Ryan Houdek 2014-11-29 04:21:13 +00:00
parent 9c82adb14f
commit 581ab9edec
1 changed files with 8 additions and 0 deletions

View File

@ -723,6 +723,14 @@ void JitArm::cntlzwx(UGeckoInstruction inst)
JITDISABLE(bJITIntegerOff);
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);
ARMReg RA = gpr.R(a);
ARMReg RS = gpr.R(s);