mirror of https://github.com/PCSX2/pcsx2.git
x86/iR5900: Remove reset atomics
These only ever get changed on the EE thread now, this ain't no wx mess.
This commit is contained in:
parent
4c1d93a322
commit
15a38f5f9d
|
@ -60,8 +60,8 @@
|
|||
using namespace x86Emitter;
|
||||
using namespace R5900;
|
||||
|
||||
static std::atomic<bool> eeRecIsReset(false);
|
||||
static std::atomic<bool> eeRecNeedsReset(false);
|
||||
static bool eeRecIsReset = false;
|
||||
static bool eeRecNeedsReset = false;
|
||||
static bool eeCpuExecuting = false;
|
||||
static bool eeRecExitRequested = false;
|
||||
static bool g_resetEeScalingStats = false;
|
||||
|
@ -617,18 +617,18 @@ alignas(16) static u8 manual_counter[Ps2MemSize::MainRam >> 12];
|
|||
////////////////////////////////////////////////////
|
||||
static void recResetRaw()
|
||||
{
|
||||
eeRecNeedsReset = false;
|
||||
if (eeRecIsReset)
|
||||
return;
|
||||
|
||||
Console.WriteLn(Color_StrongBlack, "EE/iR5900-32 Recompiler Reset");
|
||||
|
||||
Perf::ee.reset();
|
||||
|
||||
EE::Profiler.Reset();
|
||||
|
||||
recAlloc();
|
||||
|
||||
eeRecNeedsReset = false;
|
||||
if (eeRecIsReset.exchange(true))
|
||||
return;
|
||||
|
||||
Console.WriteLn(Color_StrongBlack, "EE/iR5900-32 Recompiler Reset");
|
||||
|
||||
recMem->Reset();
|
||||
ClearRecLUT((BASEBLOCK*)recLutReserve_RAM, recLutSize);
|
||||
memset(recRAMCopy, 0, Ps2MemSize::MainRam);
|
||||
|
@ -648,6 +648,7 @@ static void recResetRaw()
|
|||
|
||||
g_branch = 0;
|
||||
g_resetEeScalingStats = true;
|
||||
eeRecIsReset = true;
|
||||
}
|
||||
|
||||
static void recShutdown()
|
||||
|
@ -713,8 +714,8 @@ static void recExecute()
|
|||
// Reset before we try to execute any code, if there's one pending.
|
||||
// We need to do this here, because if we reset while we're executing, it sets the "needs reset"
|
||||
// flag, which triggers a JIT exit (the fastjmp_set below), and eventually loops back here.
|
||||
eeRecIsReset.store(false);
|
||||
if (eeRecNeedsReset.load())
|
||||
eeRecIsReset = false;
|
||||
if (eeRecNeedsReset)
|
||||
recResetRaw();
|
||||
|
||||
m_cpuException = nullptr;
|
||||
|
|
Loading…
Reference in New Issue