Adds support back for non-immediate cmp/cmpi to ARMv7 JIT.

This commit is contained in:
Ryan Houdek 2014-10-23 15:19:51 +00:00
parent 0253c35d3a
commit 6743d6ef1f
1 changed files with 22 additions and 2 deletions

View File

@ -772,7 +772,14 @@ void JitArm::cmp (UGeckoInstruction inst)
return; return;
} }
FALLBACK_IF(true); ARMReg rA = gpr.GetReg();
ARMReg RA = gpr.R(a);
ARMReg RB = gpr.R(b);
SUB(rA, RA, RB);
ComputeRC(rA, crf);
gpr.Unlock(rA);
} }
void JitArm::cmpi(UGeckoInstruction inst) void JitArm::cmpi(UGeckoInstruction inst)
{ {
@ -785,8 +792,21 @@ void JitArm::cmpi(UGeckoInstruction inst)
ComputeRC((s32)gpr.GetImm(a) - inst.SIMM_16, crf); ComputeRC((s32)gpr.GetImm(a) - inst.SIMM_16, crf);
return; return;
} }
ARMReg rA = gpr.GetReg();
ARMReg RA = gpr.R(a);
FALLBACK_IF(true); if (inst.SIMM_16 >= 0 && inst.SIMM_16 < 256)
{
SUB(rA, RA, inst.SIMM_16);
}
else
{
MOVI2R(rA, inst.SIMM_16);
SUB(rA, RA, rA);
}
ComputeRC(rA, crf);
gpr.Unlock(rA);
} }
void JitArm::negx(UGeckoInstruction inst) void JitArm::negx(UGeckoInstruction inst)