HW/CPU: Avoid ppcState global.
This commit is contained in:
parent
078a460446
commit
18d9ec75f1
|
@ -88,6 +88,8 @@ static void ExecutePendingJobs(std::unique_lock<std::mutex>& state_lock)
|
|||
|
||||
void Run()
|
||||
{
|
||||
auto& system = Core::System::GetInstance();
|
||||
|
||||
// Updating the host CPU's rounding mode must be done on the CPU thread.
|
||||
// We can't rely on PowerPC::Init doing it, since it's called from EmuThread.
|
||||
PowerPC::RoundingModeUpdated();
|
||||
|
@ -111,7 +113,7 @@ void Run()
|
|||
// If watchpoints are enabled, any instruction could be a breakpoint.
|
||||
if (PowerPC::GetMode() != PowerPC::CoreMode::Interpreter)
|
||||
{
|
||||
if (PowerPC::breakpoints.IsAddressBreakPoint(PowerPC::ppcState.pc) ||
|
||||
if (PowerPC::breakpoints.IsAddressBreakPoint(system.GetPPCState().pc) ||
|
||||
PowerPC::memchecks.HasAny())
|
||||
{
|
||||
s_state = State::Stepping;
|
||||
|
|
|
@ -69,7 +69,7 @@ const State* GetStatePtr();
|
|||
|
||||
// Locks the CPU Thread (waiting for it to become idle).
|
||||
// While this lock is held, the CPU Thread will not perform any action so it is safe to access
|
||||
// PowerPC::ppcState, CoreTiming, etc. without racing the CPU Thread.
|
||||
// PowerPC, CoreTiming, etc. without racing the CPU Thread.
|
||||
// Cannot be used recursively. Must be paired as PauseAndLock(true)/PauseAndLock(false).
|
||||
// Return value for do_lock == true is whether the state was State::Running or not.
|
||||
// Return value for do_lock == false is whether the state was changed *to* State::Running or not.
|
||||
|
|
Loading…
Reference in New Issue