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:
skidau 2012-03-03 14:26:39 +11:00
parent 9e398fd418
commit 9e649ce798
1 changed files with 8 additions and 2 deletions

View File

@ -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.
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);
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);
TEST(32, M((void *)&ProcessorInterface::m_InterruptCause), Imm32(ProcessorInterface::INT_CAUSE_CP));
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();
SetJumpTarget(ClearInt);
SetJumpTarget(noCPInt);
SetJumpTarget(noExtException);
}