[ARM32] negx optimization if source is immediate

This commit is contained in:
Ryan Houdek 2014-11-29 04:02:57 +00:00
parent 1dbb39f791
commit 9c82adb14f
1 changed files with 8 additions and 0 deletions

View File

@ -850,6 +850,14 @@ void JitArm::negx(UGeckoInstruction inst)
INSTRUCTION_START
JITDISABLE(bJITIntegerOff);
if (gpr.IsImm(inst.RA))
{
gpr.SetImmediate(inst.RD, ~gpr.GetImm(inst.RA) + 1);
if (inst.Rc)
ComputeRC(gpr.GetImm(inst.RD), 0);
return;
}
gpr.BindToRegister(inst.RD, inst.RD == inst.RA);
ARMReg RD = gpr.R(inst.RD);
ARMReg RA = gpr.R(inst.RA);