mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
JitArm64: Implement mcrxr.
This commit is contained in:
parent
293553f317
commit
041129fb34
@ -99,6 +99,7 @@ public:
|
||||
void mtmsr(UGeckoInstruction inst);
|
||||
void mfmsr(UGeckoInstruction inst);
|
||||
void mcrf(UGeckoInstruction inst);
|
||||
void mcrxr(UGeckoInstruction inst);
|
||||
void mfsr(UGeckoInstruction inst);
|
||||
void mtsr(UGeckoInstruction inst);
|
||||
void mfsrin(UGeckoInstruction inst);
|
||||
|
@ -84,6 +84,36 @@ void JitArm64::mcrf(UGeckoInstruction inst)
|
||||
}
|
||||
}
|
||||
|
||||
void JitArm64::mcrxr(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITSystemRegistersOff);
|
||||
|
||||
ARM64Reg WA = gpr.GetReg();
|
||||
ARM64Reg XA = EncodeRegTo64(WA);
|
||||
ARM64Reg WB = gpr.GetReg();
|
||||
ARM64Reg XB = EncodeRegTo64(WB);
|
||||
|
||||
// Copy XER[0-3] into CR[inst.CRFD]
|
||||
LDRB(INDEX_UNSIGNED, WA, PPC_REG, PPCSTATE_OFF(xer_ca));
|
||||
LDRB(INDEX_UNSIGNED, WB, PPC_REG, PPCSTATE_OFF(xer_so_ov));
|
||||
|
||||
// [0 SO OV CA]
|
||||
ADD(WA, WA, WB, ArithOption(WB, ST_LSL, 2));
|
||||
// [SO OV CA 0] << 3
|
||||
LSL(WA, WA, 4);
|
||||
|
||||
MOVP2R(XB, m_crTable);
|
||||
LDR(XB, XB, XA);
|
||||
STR(INDEX_UNSIGNED, XB, PPC_REG, PPCSTATE_OFF(cr_val[inst.CRFD]));
|
||||
|
||||
// Clear XER[0-3]
|
||||
STRB(INDEX_UNSIGNED, WZR, PPC_REG, PPCSTATE_OFF(xer_ca));
|
||||
STRB(INDEX_UNSIGNED, WZR, PPC_REG, PPCSTATE_OFF(xer_so_ov));
|
||||
|
||||
gpr.Unlock(WA, WB);
|
||||
}
|
||||
|
||||
void JitArm64::mfsr(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
|
@ -303,7 +303,7 @@ static GekkoOPTemplate table31[] = {
|
||||
{339, &JitArm64::mfspr}, // mfspr
|
||||
{467, &JitArm64::mtspr}, // mtspr
|
||||
{371, &JitArm64::mftb}, // mftb
|
||||
{512, &JitArm64::FallBackToInterpreter}, // mcrxr
|
||||
{512, &JitArm64::mcrxr}, // mcrxr
|
||||
{595, &JitArm64::mfsr}, // mfsr
|
||||
{659, &JitArm64::mfsrin}, // mfsrin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user