[AArch64] Implement mcrf.

This commit is contained in:
Ryan Houdek 2014-09-20 21:19:25 -05:00
parent e708e8d5a0
commit 0f8c5bda40
3 changed files with 17 additions and 1 deletions

View File

@ -86,6 +86,7 @@ public:
// System Registers
void mtmsr(UGeckoInstruction inst);
void mcrf(UGeckoInstruction inst);
// LoadStore
void icbi(UGeckoInstruction inst);

View File

@ -58,3 +58,18 @@ void JitArm64::mtmsr(UGeckoInstruction inst)
WriteExit(js.compilerPC + 4);
}
void JitArm64::mcrf(UGeckoInstruction inst)
{
INSTRUCTION_START
JITDISABLE(bJITSystemRegistersOff);
if (inst.CRFS != inst.CRFD)
{
ARM64Reg WA = gpr.GetReg();
ARM64Reg XA = EncodeRegTo64(WA);
LDR(INDEX_UNSIGNED, XA, X29, PPCSTATE_OFF(cr_val[inst.CRFS]));
STR(INDEX_UNSIGNED, XA, X29, PPCSTATE_OFF(cr_val[inst.CRFD]));
gpr.Unlock(WA);
}
}

View File

@ -172,7 +172,7 @@ static GekkoOPTemplate table19[] =
{193, &JitArm64::FallBackToInterpreter}, //"crxor", OPTYPE_CR, FL_EVIL}},
{150, &JitArm64::DoNothing}, //"isync", OPTYPE_ICACHE, FL_EVIL}},
{0, &JitArm64::FallBackToInterpreter}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}},
{0, &JitArm64::mcrf}, //"mcrf", OPTYPE_SYSTEM, FL_EVIL}},
{50, &JitArm64::rfi}, //"rfi", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS, 1}},
{18, &JitArm64::Break}, //"rfid", OPTYPE_SYSTEM, FL_ENDBLOCK | FL_CHECKEXCEPTIONS}}