Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ARM] cntlzwx implementation.
  • Loading branch information
Sonicadvance1 committed Sep 14, 2013
1 parent ef2ea31 commit 6fe86f1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions Source/Core/Core/Src/PowerPC/JitArm32/Jit.h
Expand Up @@ -157,6 +157,7 @@ class JitArm : public JitBase, public ArmGen::ARMXCodeBlock
void arith(UGeckoInstruction _inst);

void addex(UGeckoInstruction _inst);
void cntlzwx(UGeckoInstruction _inst);
void cmp (UGeckoInstruction _inst);
void cmpi(UGeckoInstruction _inst);
void cmpl(UGeckoInstruction _inst);
Expand Down
16 changes: 16 additions & 0 deletions Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Integer.cpp
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/PowerPC/JitArm32/JitArm_Tables.cpp
Expand Up @@ -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}},
Expand Down

0 comments on commit 6fe86f1

Please sign in to comment.