Merge pull request #803 from cxd4/speed-plz
re-ordered CPU interpreter main loop if/else branch predictor
This commit is contained in:
commit
8b8c7fa2bb
|
@ -276,14 +276,19 @@ void CInterpreterCPU::ExecuteCPU()
|
||||||
{
|
{
|
||||||
while (!Done)
|
while (!Done)
|
||||||
{
|
{
|
||||||
if (g_MMU->LW_VAddr(PROGRAM_COUNTER, Opcode.Hex))
|
if (!g_MMU->LW_VAddr(PROGRAM_COUNTER, Opcode.Hex))
|
||||||
{
|
{
|
||||||
/*if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER< 0x80380000)
|
g_Reg->DoTLBReadMiss(R4300iOp::m_NextInstruction == JUMP, PROGRAM_COUNTER);
|
||||||
|
R4300iOp::m_NextInstruction = NORMAL;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* if (PROGRAM_COUNTER > 0x80000300 && PROGRAM_COUNTER < 0x80380000)
|
||||||
{
|
{
|
||||||
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER));
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
// WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %s t9: %08X v1: %08X",*_PROGRAM_COUNTER,R4300iOpcodeName(Opcode.Hex,*_PROGRAM_COUNTER),_GPR[0x19].UW[0],_GPR[0x03].UW[0]);
|
||||||
//WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType());
|
// WriteTraceF((TraceType)(TraceError | TraceNoHeader),"%X: %d %d",*_PROGRAM_COUNTER,*g_NextTimer,g_SystemTimer->CurrentType());
|
||||||
}*/
|
} */
|
||||||
m_R4300i_Opcode[Opcode.op]();
|
m_R4300i_Opcode[Opcode.op]();
|
||||||
NextTimer -= CountPerOp;
|
NextTimer -= CountPerOp;
|
||||||
|
|
||||||
|
@ -333,12 +338,6 @@ void CInterpreterCPU::ExecuteCPU()
|
||||||
g_Notify->BreakPoint(__FILEW__, __LINE__);
|
g_Notify->BreakPoint(__FILEW__, __LINE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
g_Reg->DoTLBReadMiss(R4300iOp::m_NextInstruction == JUMP, PROGRAM_COUNTER);
|
|
||||||
R4300iOp::m_NextInstruction = NORMAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
__except (g_MMU->MemoryFilter(GetExceptionCode(), GetExceptionInformation()))
|
__except (g_MMU->MemoryFilter(GetExceptionCode(), GetExceptionInformation()))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue