summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-03-28 21:47:38 +0200
committerAdmiral H. Curtiss <pikachu025@gmail.com>2023-04-05 20:09:31 +0200
commitaec3a882d7a875e45f97279d4ced3d3140a7cc87 (patch)
treeb394758b45a47af19515340eb1af74ac676c369a /Source/Core
parent18f8ae37ab1091f104114489a4a8371d94b9475c (diff)
PowerPC/JitInterface: Access PowerPCState through System.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/JitInterface.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Core/Core/PowerPC/JitInterface.cpp b/Source/Core/Core/PowerPC/JitInterface.cpp
index 084064ceaf..750d3b6d65 100644
--- a/Source/Core/Core/PowerPC/JitInterface.cpp
+++ b/Source/Core/Core/PowerPC/JitInterface.cpp
@@ -163,14 +163,13 @@ JitInterface::GetHostCode(u32 address) const
return GetHostCodeError::NoJitActive;
}
- JitBlock* block =
- m_jit->GetBlockCache()->GetBlockFromStartAddress(address, PowerPC::ppcState.msr.Hex);
+ auto& ppc_state = m_system.GetPPCState();
+ JitBlock* block = m_jit->GetBlockCache()->GetBlockFromStartAddress(address, ppc_state.msr.Hex);
if (!block)
{
for (int i = 0; i < 500; i++)
{
- block = m_jit->GetBlockCache()->GetBlockFromStartAddress(address - 4 * i,
- PowerPC::ppcState.msr.Hex);
+ block = m_jit->GetBlockCache()->GetBlockFromStartAddress(address - 4 * i, ppc_state.msr.Hex);
if (block)
break;
}
@@ -287,25 +286,26 @@ void JitInterface::CompileExceptionCheck(ExceptionType type)
break;
}
- if (PowerPC::ppcState.pc != 0 &&
- (exception_addresses->find(PowerPC::ppcState.pc)) == (exception_addresses->end()))
+ auto& ppc_state = m_system.GetPPCState();
+ if (ppc_state.pc != 0 &&
+ (exception_addresses->find(ppc_state.pc)) == (exception_addresses->end()))
{
if (type == ExceptionType::FIFOWrite)
{
ASSERT(Core::IsCPUThread());
- Core::CPUThreadGuard guard(Core::System::GetInstance());
+ Core::CPUThreadGuard guard(m_system);
// Check in case the code has been replaced since: do we need to do this?
const OpType optype =
- PPCTables::GetOpInfo(PowerPC::MMU::HostRead_U32(guard, PowerPC::ppcState.pc))->type;
+ PPCTables::GetOpInfo(PowerPC::MMU::HostRead_U32(guard, ppc_state.pc))->type;
if (optype != OpType::Store && optype != OpType::StoreFP && optype != OpType::StorePS)
return;
}
- exception_addresses->insert(PowerPC::ppcState.pc);
+ exception_addresses->insert(ppc_state.pc);
// Invalidate the JIT block so that it gets recompiled with the external exception check
// included.
- m_jit->GetBlockCache()->InvalidateICache(PowerPC::ppcState.pc, 4, true);
+ m_jit->GetBlockCache()->InvalidateICache(ppc_state.pc, 4, true);
}
}