Global Variable: Rename _SyncSystem to g_SyncSystem
This commit is contained in:
parent
c3df4cf49d
commit
4e1d29d322
|
@ -524,7 +524,7 @@ bool CN64System::SetActiveSystem( bool bActive )
|
||||||
g_System = this;
|
g_System = this;
|
||||||
if (g_BaseSystem == this)
|
if (g_BaseSystem == this)
|
||||||
{
|
{
|
||||||
_SyncSystem = m_SyncCPU;
|
g_SyncSystem = m_SyncCPU;
|
||||||
}
|
}
|
||||||
_Recompiler = m_Recomp;
|
_Recompiler = m_Recomp;
|
||||||
_MMU = &m_MMU_VM;
|
_MMU = &m_MMU_VM;
|
||||||
|
@ -557,7 +557,7 @@ bool CN64System::SetActiveSystem( bool bActive )
|
||||||
if (this == g_BaseSystem)
|
if (this == g_BaseSystem)
|
||||||
{
|
{
|
||||||
g_System = NULL;
|
g_System = NULL;
|
||||||
_SyncSystem = NULL;
|
g_SyncSystem = NULL;
|
||||||
_Recompiler = NULL;
|
_Recompiler = NULL;
|
||||||
_MMU = NULL;
|
_MMU = NULL;
|
||||||
_TLB = NULL;
|
_TLB = NULL;
|
||||||
|
@ -980,12 +980,12 @@ void CN64System::SyncCPU (CN64System * const SecondCPU)
|
||||||
|
|
||||||
void CN64System::SyncSystem()
|
void CN64System::SyncSystem()
|
||||||
{
|
{
|
||||||
SyncCPU(_SyncSystem);
|
SyncCPU(g_SyncSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CN64System::SyncSystemPC()
|
void CN64System::SyncSystemPC()
|
||||||
{
|
{
|
||||||
SyncCPUPC(_SyncSystem);
|
SyncCPUPC(g_SyncSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CN64System::DumpSyncErrors (CN64System * SecondCPU) {
|
void CN64System::DumpSyncErrors (CN64System * SecondCPU) {
|
||||||
|
|
|
@ -635,7 +635,7 @@ bool CCodeBlock::Compile()
|
||||||
|
|
||||||
EnterCodeBlock();
|
EnterCodeBlock();
|
||||||
|
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
//if ((DWORD)BlockInfo.CompiledLocation == 0x60A7B73B) { X86BreakPoint(__FILE__,__LINE__); }
|
//if ((DWORD)BlockInfo.CompiledLocation == 0x60A7B73B) { X86BreakPoint(__FILE__,__LINE__); }
|
||||||
//MoveConstToVariable((DWORD)BlockInfo.CompiledLocation,&CurrentBlock,"CurrentBlock");
|
//MoveConstToVariable((DWORD)BlockInfo.CompiledLocation,&CurrentBlock,"CurrentBlock");
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
||||||
CompileSystemCheck((DWORD)-1,ExitRegSet);
|
CompileSystemCheck((DWORD)-1,ExitRegSet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_SyncSystem)
|
if (g_SyncSystem)
|
||||||
{
|
{
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
|
@ -244,11 +244,11 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
||||||
case CExitInfo::DoCPU_Action:
|
case CExitInfo::DoCPU_Action:
|
||||||
MoveConstToX86reg((DWORD)_SystemEvents,x86_ECX);
|
MoveConstToX86reg((DWORD)_SystemEvents,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CSystemEvents::ExecuteEvents),"CSystemEvents::ExecuteEvents");
|
Call_Direct(AddressOf(&CSystemEvents::ExecuteEvents),"CSystemEvents::ExecuteEvents");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
//g_System->SyncCPU(_SyncSystem);
|
//g_System->SyncCPU(g_SyncSystem);
|
||||||
ExitCodeBlock();
|
ExitCodeBlock();
|
||||||
break;
|
break;
|
||||||
case CExitInfo::DoSysCall:
|
case CExitInfo::DoSysCall:
|
||||||
|
@ -257,7 +257,7 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
||||||
PushImm32(bDelay ? "true" : "false", bDelay);
|
PushImm32(bDelay ? "true" : "false", bDelay);
|
||||||
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CRegisters::DoSysCallException), "CRegisters::DoSysCallException");
|
Call_Direct(AddressOf(&CRegisters::DoSysCallException), "CRegisters::DoSysCallException");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
||||||
PushImm32(bDelay ? "true" : "false", bDelay);
|
PushImm32(bDelay ? "true" : "false", bDelay);
|
||||||
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CRegisters::DoCopUnusableException), "CRegisters::DoCopUnusableException");
|
Call_Direct(AddressOf(&CRegisters::DoCopUnusableException), "CRegisters::DoCopUnusableException");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,7 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
||||||
if (m_NextInstruction == JUMP || m_NextInstruction == DELAY_SLOT) {
|
if (m_NextInstruction == JUMP || m_NextInstruction == DELAY_SLOT) {
|
||||||
X86BreakPoint(__FILE__,__LINE__);
|
X86BreakPoint(__FILE__,__LINE__);
|
||||||
}
|
}
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
||||||
PushImm32(m_NextInstruction == JUMP || m_NextInstruction == DELAY_SLOT);
|
PushImm32(m_NextInstruction == JUMP || m_NextInstruction == DELAY_SLOT);
|
||||||
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
MoveConstToX86reg((DWORD)_Reg,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CRegisters::DoTLBReadMiss),"CRegisters::DoTLBReadMiss");
|
Call_Direct(AddressOf(&CRegisters::DoTLBReadMiss),"CRegisters::DoTLBReadMiss");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -315,7 +315,7 @@ void CCodeSection::CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitReg
|
||||||
}
|
}
|
||||||
MoveConstToVariable(0,&_RegHI->UW[0],"_RegHI->UW[0]");
|
MoveConstToVariable(0,&_RegHI->UW[0],"_RegHI->UW[0]");
|
||||||
MoveConstToVariable(0,&_RegLO->UW[0],"_RegLO->UW[0]");
|
MoveConstToVariable(0,&_RegLO->UW[0],"_RegLO->UW[0]");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -387,7 +387,7 @@ void CCodeSection::GenerateSectionLinkage (void)
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
// WriteBackRegisters(Section);
|
// WriteBackRegisters(Section);
|
||||||
// if (_SyncSystem) {
|
// if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -483,7 +483,7 @@ void CCodeSection::GenerateSectionLinkage (void)
|
||||||
CPU_Message("PermLoop *** 1");
|
CPU_Message("PermLoop *** 1");
|
||||||
MoveConstToVariable(JumpInfo[i]->TargetPC,_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(JumpInfo[i]->TargetPC,_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
UpdateCounters(JumpInfo[i]->RegSet,false, true);
|
UpdateCounters(JumpInfo[i]->RegSet,false, true);
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -937,7 +937,7 @@ bool CCodeSection::GenerateX86Code ( DWORD Test )
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -950,7 +950,7 @@ bool CCodeSection::GenerateX86Code ( DWORD Test )
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -967,7 +967,7 @@ bool CCodeSection::GenerateX86Code ( DWORD Test )
|
||||||
{
|
{
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
BeforeCallDirect(m_RegWorkingSet);
|
BeforeCallDirect(m_RegWorkingSet);
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystemPC), "CN64System::SyncSystemPC");
|
Call_Direct(AddressOf(&CN64System::SyncSystemPC), "CN64System::SyncSystemPC");
|
||||||
|
@ -985,7 +985,7 @@ bool CCodeSection::GenerateX86Code ( DWORD Test )
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -1000,7 +1000,7 @@ bool CCodeSection::GenerateX86Code ( DWORD Test )
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -1010,7 +1010,7 @@ bool CCodeSection::GenerateX86Code ( DWORD Test )
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,10 +337,10 @@ void CRecompiler::RecompilerMain_Lookup( void )
|
||||||
opsExecuted += CountPerOp();
|
opsExecuted += CountPerOp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_SyncSystem)
|
if (g_SyncSystem)
|
||||||
{
|
{
|
||||||
g_System->UpdateSyncCPU(_SyncSystem,opsExecuted);
|
g_System->UpdateSyncCPU(g_SyncSystem,opsExecuted);
|
||||||
g_System->SyncCPU(_SyncSystem);
|
g_System->SyncCPU(g_SyncSystem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -539,10 +539,10 @@ void CRecompiler::RecompilerMain_Lookup_TLB( void )
|
||||||
opsExecuted += CountPerOp();
|
opsExecuted += CountPerOp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_SyncSystem)
|
if (g_SyncSystem)
|
||||||
{
|
{
|
||||||
g_System->UpdateSyncCPU(_SyncSystem,opsExecuted);
|
g_System->UpdateSyncCPU(g_SyncSystem,opsExecuted);
|
||||||
g_System->SyncCPU(_SyncSystem);
|
g_System->SyncCPU(g_SyncSystem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -587,10 +587,10 @@ void CRecompiler::RecompilerMain_Lookup_validate( void )
|
||||||
opsExecuted += CountPerOp();
|
opsExecuted += CountPerOp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_SyncSystem)
|
if (g_SyncSystem)
|
||||||
{
|
{
|
||||||
g_System->UpdateSyncCPU(_SyncSystem,opsExecuted);
|
g_System->UpdateSyncCPU(g_SyncSystem,opsExecuted);
|
||||||
g_System->SyncCPU(_SyncSystem);
|
g_System->SyncCPU(g_SyncSystem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -657,10 +657,10 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB( void )
|
||||||
opsExecuted += CountPerOp();
|
opsExecuted += CountPerOp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_SyncSystem)
|
if (g_SyncSystem)
|
||||||
{
|
{
|
||||||
g_System->UpdateSyncCPU(_SyncSystem,opsExecuted);
|
g_System->UpdateSyncCPU(g_SyncSystem,opsExecuted);
|
||||||
g_System->SyncCPU(_SyncSystem);
|
g_System->SyncCPU(g_SyncSystem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5058,7 +5058,7 @@ void CRecompilerOps::UnknownOpcode (void) {
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(m_CompilePC,&_Reg->m_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -5107,7 +5107,7 @@ void CRecompilerOps::ExitCodeBlock ( void )
|
||||||
|
|
||||||
void CRecompilerOps::UpdateSyncCPU ( CRegInfo & RegSet, DWORD Cycles )
|
void CRecompilerOps::UpdateSyncCPU ( CRegInfo & RegSet, DWORD Cycles )
|
||||||
{
|
{
|
||||||
if (!_SyncSystem)
|
if (!g_SyncSystem)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -5115,7 +5115,7 @@ void CRecompilerOps::UpdateSyncCPU ( CRegInfo & RegSet, DWORD Cycles )
|
||||||
WriteX86Comment("Updating Sync CPU");
|
WriteX86Comment("Updating Sync CPU");
|
||||||
BeforeCallDirect(RegSet);
|
BeforeCallDirect(RegSet);
|
||||||
PushImm32(stdstr_f("%d",Cycles).c_str(),Cycles);
|
PushImm32(stdstr_f("%d",Cycles).c_str(),Cycles);
|
||||||
PushImm32("_SyncSystem",(DWORD)_SyncSystem);
|
PushImm32("g_SyncSystem",(DWORD)g_SyncSystem);
|
||||||
MoveConstToX86reg((DWORD)g_System,x86_ECX);
|
MoveConstToX86reg((DWORD)g_System,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::UpdateSyncCPU),"CN64System::UpdateSyncCPU");
|
Call_Direct(AddressOf(&CN64System::UpdateSyncCPU),"CN64System::UpdateSyncCPU");
|
||||||
AfterCallDirect(RegSet);
|
AfterCallDirect(RegSet);
|
||||||
|
@ -5166,7 +5166,7 @@ void CRecompilerOps::CompileSystemCheck (DWORD TargetPC, const CRegInfo & RegSet
|
||||||
|
|
||||||
MoveConstToX86reg((DWORD)_SystemEvents,x86_ECX);
|
MoveConstToX86reg((DWORD)_SystemEvents,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CSystemEvents::ExecuteEvents),"CSystemEvents::ExecuteEvents");
|
Call_Direct(AddressOf(&CSystemEvents::ExecuteEvents),"CSystemEvents::ExecuteEvents");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -5181,7 +5181,7 @@ void CRecompilerOps::OverflowDelaySlot (BOOL TestTimer)
|
||||||
m_RegWorkingSet.WriteBackRegisters();
|
m_RegWorkingSet.WriteBackRegisters();
|
||||||
UpdateCounters(m_RegWorkingSet,false,true);
|
UpdateCounters(m_RegWorkingSet,false,true);
|
||||||
MoveConstToVariable(CompilePC() + 4,_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
MoveConstToVariable(CompilePC() + 4,_PROGRAM_COUNTER,"PROGRAM_COUNTER");
|
||||||
if (_SyncSystem) {
|
if (g_SyncSystem) {
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
Call_Direct(AddressOf(&CN64System::SyncSystem), "CN64System::SyncSystem");
|
||||||
}
|
}
|
||||||
|
@ -5199,7 +5199,7 @@ void CRecompilerOps::OverflowDelaySlot (BOOL TestTimer)
|
||||||
Call_Direct(AddressOf(&CRecompiler::ResetMemoryStackPos), "CRecompiler::ResetMemoryStackPos");
|
Call_Direct(AddressOf(&CRecompiler::ResetMemoryStackPos), "CRecompiler::ResetMemoryStackPos");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_SyncSystem)
|
if (g_SyncSystem)
|
||||||
{
|
{
|
||||||
UpdateSyncCPU(m_RegWorkingSet,CountPerOp());
|
UpdateSyncCPU(m_RegWorkingSet,CountPerOp());
|
||||||
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
MoveConstToX86reg((DWORD)g_BaseSystem,x86_ECX);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
CN64System * g_System = NULL;
|
CN64System * g_System = NULL;
|
||||||
CN64System * g_BaseSystem = NULL;
|
CN64System * g_BaseSystem = NULL;
|
||||||
CN64System * _SyncSystem = NULL;
|
CN64System * g_SyncSystem = NULL;
|
||||||
CRecompiler * _Recompiler = NULL;
|
CRecompiler * _Recompiler = NULL;
|
||||||
CMipsMemory * _MMU = NULL; //Memory of the n64
|
CMipsMemory * _MMU = NULL; //Memory of the n64
|
||||||
CTLB * _TLB = NULL; //TLB Unit
|
CTLB * _TLB = NULL; //TLB Unit
|
||||||
|
|
|
@ -3,7 +3,7 @@ extern CSettings * g_Settings;
|
||||||
|
|
||||||
extern CN64System * g_System;
|
extern CN64System * g_System;
|
||||||
extern CN64System * g_BaseSystem;
|
extern CN64System * g_BaseSystem;
|
||||||
extern CN64System * _SyncSystem;
|
extern CN64System * g_SyncSystem;
|
||||||
extern CRecompiler * _Recompiler;
|
extern CRecompiler * _Recompiler;
|
||||||
extern CMipsMemory * _MMU; //Memory of the n64
|
extern CMipsMemory * _MMU; //Memory of the n64
|
||||||
extern CTLB * _TLB; //TLB Unit
|
extern CTLB * _TLB; //TLB Unit
|
||||||
|
|
Loading…
Reference in New Issue