Added additional checks to ensure that only a FIFO breakpoint exception is handled. This fixes the hangs in games like de Blob, Xenoblade and Super Mario Galaxy introduced by r9e398fd41802.
This commit is contained in:
parent
9e398fd418
commit
9e649ce798
|
@ -571,7 +571,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add an external exception check if the instruction writes to the FIFO.
|
// Add an external exception check if the instruction writes to the FIFO.
|
||||||
if (jit->js.fifoWriteAddresses.find(js.compilerPC) != jit->js.fifoWriteAddresses.end())
|
if (jit->js.fifoWriteAddresses.find(ops[i].address) != jit->js.fifoWriteAddresses.end())
|
||||||
{
|
{
|
||||||
gpr.Flush(FLUSH_ALL);
|
gpr.Flush(FLUSH_ALL);
|
||||||
fpr.Flush(FLUSH_ALL);
|
fpr.Flush(FLUSH_ALL);
|
||||||
|
@ -580,10 +580,16 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
FixupBranch noExtException = J_CC(CC_Z);
|
FixupBranch noExtException = J_CC(CC_Z);
|
||||||
TEST(32, M((void *)&ProcessorInterface::m_InterruptCause), Imm32(ProcessorInterface::INT_CAUSE_CP));
|
TEST(32, M((void *)&ProcessorInterface::m_InterruptCause), Imm32(ProcessorInterface::INT_CAUSE_CP));
|
||||||
FixupBranch noCPInt = J_CC(CC_Z);
|
FixupBranch noCPInt = J_CC(CC_Z);
|
||||||
|
TEST(32, M((void *)&ProcessorInterface::m_InterruptCause),
|
||||||
|
Imm32(ProcessorInterface::INT_CAUSE_PE_TOKEN |
|
||||||
|
ProcessorInterface::INT_CAUSE_PE_FINISH |
|
||||||
|
ProcessorInterface::INT_CAUSE_DSP));
|
||||||
|
FixupBranch ClearInt = J_CC(CC_NZ);
|
||||||
|
|
||||||
MOV(32, M(&PC), Imm32(js.compilerPC));
|
MOV(32, M(&PC), Imm32(ops[i].address));
|
||||||
WriteExceptionExit();
|
WriteExceptionExit();
|
||||||
|
|
||||||
|
SetJumpTarget(ClearInt);
|
||||||
SetJumpTarget(noCPInt);
|
SetJumpTarget(noCPInt);
|
||||||
SetJumpTarget(noExtException);
|
SetJumpTarget(noExtException);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue