mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
Jit64: Fallback support of branching instructions
This commit is contained in:
parent
ced30899cc
commit
30869135d5
@ -236,7 +236,7 @@ void Jit64::WriteCallInterpreter(UGeckoInstruction inst)
|
||||
{
|
||||
gpr.Flush();
|
||||
fpr.Flush();
|
||||
if (js.isLastInstruction)
|
||||
if (js.op->opinfo->flags & FL_ENDBLOCK)
|
||||
{
|
||||
MOV(32, PPCSTATE(pc), Imm32(js.compilerPC));
|
||||
MOV(32, PPCSTATE(npc), Imm32(js.compilerPC + 4));
|
||||
@ -245,6 +245,25 @@ void Jit64::WriteCallInterpreter(UGeckoInstruction inst)
|
||||
ABI_PushRegistersAndAdjustStack({}, 0);
|
||||
ABI_CallFunctionC((void*)instr, inst.hex);
|
||||
ABI_PopRegistersAndAdjustStack({}, 0);
|
||||
if (js.op->opinfo->flags & FL_ENDBLOCK)
|
||||
{
|
||||
if (js.isLastInstruction)
|
||||
{
|
||||
MOV(32, R(RSCRATCH), PPCSTATE(npc));
|
||||
MOV(32, PPCSTATE(pc), R(RSCRATCH));
|
||||
WriteExceptionExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
MOV(32, R(RSCRATCH), PPCSTATE(npc));
|
||||
SUB(32, R(RSCRATCH), Imm32(js.compilerPC + 4));
|
||||
FixupBranch c = J_CC(CC_Z);
|
||||
MOV(32, R(RSCRATCH), PPCSTATE(npc));
|
||||
MOV(32, PPCSTATE(pc), R(RSCRATCH));
|
||||
WriteExceptionExit();
|
||||
SetJumpTarget(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Jit64::FallBackToInterpreter(UGeckoInstruction _inst)
|
||||
|
@ -248,6 +248,4 @@ public:
|
||||
|
||||
void lmw(UGeckoInstruction inst);
|
||||
void stmw(UGeckoInstruction inst);
|
||||
|
||||
void icbi(UGeckoInstruction inst);
|
||||
};
|
||||
|
@ -300,7 +300,7 @@ static GekkoOPTemplate table31[] =
|
||||
|
||||
{4, &Jit64::twX}, // tw
|
||||
{598, &Jit64::DoNothing}, // sync
|
||||
{982, &Jit64::icbi}, // icbi
|
||||
{982, &Jit64::FallBackToInterpreter}, // icbi
|
||||
|
||||
// Unused instructions on GC
|
||||
{310, &Jit64::FallBackToInterpreter}, // eciwx
|
||||
|
@ -561,9 +561,3 @@ void Jit64::stmw(UGeckoInstruction inst)
|
||||
}
|
||||
gpr.UnlockAllX();
|
||||
}
|
||||
|
||||
void Jit64::icbi(UGeckoInstruction inst)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
WriteExit(js.compilerPC + 4);
|
||||
}
|
||||
|
@ -348,8 +348,7 @@ void Jit64::mfspr(UGeckoInstruction inst)
|
||||
void Jit64::mtmsr(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
// Don't interpret this, if we do we get thrown out
|
||||
//JITDISABLE(bJITSystemRegistersOff);
|
||||
JITDISABLE(bJITSystemRegistersOff);
|
||||
if (!gpr.R(inst.RS).IsImm())
|
||||
{
|
||||
gpr.Lock(inst.RS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user