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 mtmsr(UGeckoInstruction inst);
|
||||||
void mfmsr(UGeckoInstruction inst);
|
void mfmsr(UGeckoInstruction inst);
|
||||||
void mcrf(UGeckoInstruction inst);
|
void mcrf(UGeckoInstruction inst);
|
||||||
|
void mcrxr(UGeckoInstruction inst);
|
||||||
void mfsr(UGeckoInstruction inst);
|
void mfsr(UGeckoInstruction inst);
|
||||||
void mtsr(UGeckoInstruction inst);
|
void mtsr(UGeckoInstruction inst);
|
||||||
void mfsrin(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)
|
void JitArm64::mfsr(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
INSTRUCTION_START
|
INSTRUCTION_START
|
||||||
|
@ -294,18 +294,18 @@ static GekkoOPTemplate table31[] = {
|
|||||||
{759, &JitArm64::stfXX}, // stfdux
|
{759, &JitArm64::stfXX}, // stfdux
|
||||||
{983, &JitArm64::stfXX}, // stfiwx
|
{983, &JitArm64::stfXX}, // stfiwx
|
||||||
|
|
||||||
{19, &JitArm64::mfcr}, // mfcr
|
{19, &JitArm64::mfcr}, // mfcr
|
||||||
{83, &JitArm64::mfmsr}, // mfmsr
|
{83, &JitArm64::mfmsr}, // mfmsr
|
||||||
{144, &JitArm64::mtcrf}, // mtcrf
|
{144, &JitArm64::mtcrf}, // mtcrf
|
||||||
{146, &JitArm64::mtmsr}, // mtmsr
|
{146, &JitArm64::mtmsr}, // mtmsr
|
||||||
{210, &JitArm64::mtsr}, // mtsr
|
{210, &JitArm64::mtsr}, // mtsr
|
||||||
{242, &JitArm64::mtsrin}, // mtsrin
|
{242, &JitArm64::mtsrin}, // mtsrin
|
||||||
{339, &JitArm64::mfspr}, // mfspr
|
{339, &JitArm64::mfspr}, // mfspr
|
||||||
{467, &JitArm64::mtspr}, // mtspr
|
{467, &JitArm64::mtspr}, // mtspr
|
||||||
{371, &JitArm64::mftb}, // mftb
|
{371, &JitArm64::mftb}, // mftb
|
||||||
{512, &JitArm64::FallBackToInterpreter}, // mcrxr
|
{512, &JitArm64::mcrxr}, // mcrxr
|
||||||
{595, &JitArm64::mfsr}, // mfsr
|
{595, &JitArm64::mfsr}, // mfsr
|
||||||
{659, &JitArm64::mfsrin}, // mfsrin
|
{659, &JitArm64::mfsrin}, // mfsrin
|
||||||
|
|
||||||
{4, &JitArm64::twx}, // tw
|
{4, &JitArm64::twx}, // tw
|
||||||
{598, &JitArm64::DoNothing}, // sync
|
{598, &JitArm64::DoNothing}, // sync
|
||||||
|
Loading…
Reference in New Issue
Block a user