[ARM32] negx optimization if source is immediate

This commit is contained in:
Ryan Houdek committed 2014-11-30 04:10:15 +00:00
1 parent 1dbb39f791
commit 9c82adb14f
1 file changed
+8
@@ -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);