[ARM] cntlzwx implementation.

This commit is contained in:
Ryan Houdek 2013-09-14 04:29:37 +00:00
parent ef2ea31eac
commit 6fe86f1fd1
3 changed files with 18 additions and 1 deletions

View File

@ -157,6 +157,7 @@ public:
void arith(UGeckoInstruction _inst);
void addex(UGeckoInstruction _inst);
void cntlzwx(UGeckoInstruction _inst);
void cmp (UGeckoInstruction _inst);
void cmpi(UGeckoInstruction _inst);
void cmpl(UGeckoInstruction _inst);

View File

@ -529,6 +529,22 @@ void JitArm::addex(UGeckoInstruction inst)
gpr.Unlock(rA);
}
void JitArm::cntlzwx(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITIntegerOff)
u32 a = inst.RA, s = inst.RS;
ARMReg RA = gpr.R(a);
ARMReg RS = gpr.R(s);
CLZ(RA, RS);
if (inst.Rc)
{
CMP(RA, 0);
ComputeRC();
}
}
void JitArm::mulhwux(UGeckoInstruction inst)
{
INSTRUCTION_START

View File

@ -204,7 +204,7 @@ static GekkoOPTemplate table31[] =
{284, &JitArm::arith}, //"eqvx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_SB | FL_RC_BIT}},
{0, &JitArm::cmp}, //"cmp", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}},
{32, &JitArm::cmpl}, //"cmpl", OPTYPE_INTEGER, FL_IN_AB | FL_SET_CRn}},
{26, &JitArm::Default}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{26, &JitArm::cntlzwx}, //"cntlzwx",OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{922, &JitArm::extshx}, //"extshx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{954, &JitArm::extsbx}, //"extsbx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_S | FL_RC_BIT}},
{536, &JitArm::Default}, //"srwx", OPTYPE_INTEGER, FL_OUT_A | FL_IN_B | FL_IN_S | FL_RC_BIT}},