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 x86Emitter;
|
||||||
using namespace R5900;
|
using namespace R5900;
|
||||||
|
|
||||||
static std::atomic<bool> eeRecIsReset(false);
|
static bool eeRecIsReset = false;
|
||||||
static std::atomic<bool> eeRecNeedsReset(false);
|
static bool eeRecNeedsReset = false;
|
||||||
static bool eeCpuExecuting = false;
|
static bool eeCpuExecuting = false;
|
||||||
static bool eeRecExitRequested = false;
|
static bool eeRecExitRequested = false;
|
||||||
static bool g_resetEeScalingStats = false;
|
static bool g_resetEeScalingStats = false;
|
||||||
|
@ -617,18 +617,18 @@ alignas(16) static u8 manual_counter[Ps2MemSize::MainRam >> 12];
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
static void recResetRaw()
|
static void recResetRaw()
|
||||||
{
|
{
|
||||||
|
eeRecNeedsReset = false;
|
||||||
|
if (eeRecIsReset)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Console.WriteLn(Color_StrongBlack, "EE/iR5900-32 Recompiler Reset");
|
||||||
|
|
||||||
Perf::ee.reset();
|
Perf::ee.reset();
|
||||||
|
|
||||||
EE::Profiler.Reset();
|
EE::Profiler.Reset();
|
||||||
|
|
||||||
recAlloc();
|
recAlloc();
|
||||||
|
|
||||||
eeRecNeedsReset = false;
|
|
||||||
if (eeRecIsReset.exchange(true))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Console.WriteLn(Color_StrongBlack, "EE/iR5900-32 Recompiler Reset");
|
|
||||||
|
|
||||||
recMem->Reset();
|
recMem->Reset();
|
||||||
ClearRecLUT((BASEBLOCK*)recLutReserve_RAM, recLutSize);
|
ClearRecLUT((BASEBLOCK*)recLutReserve_RAM, recLutSize);
|
||||||
memset(recRAMCopy, 0, Ps2MemSize::MainRam);
|
memset(recRAMCopy, 0, Ps2MemSize::MainRam);
|
||||||
|
@ -648,6 +648,7 @@ static void recResetRaw()
|
||||||
|
|
||||||
g_branch = 0;
|
g_branch = 0;
|
||||||
g_resetEeScalingStats = true;
|
g_resetEeScalingStats = true;
|
||||||
|
eeRecIsReset = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void recShutdown()
|
static void recShutdown()
|
||||||
|
@ -713,8 +714,8 @@ static void recExecute()
|
||||||
// Reset before we try to execute any code, if there's one pending.
|
// 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"
|
// 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.
|
// flag, which triggers a JIT exit (the fastjmp_set below), and eventually loops back here.
|
||||||
eeRecIsReset.store(false);
|
eeRecIsReset = false;
|
||||||
if (eeRecNeedsReset.load())
|
if (eeRecNeedsReset)
|
||||||
recResetRaw();
|
recResetRaw();
|
||||||
|
|
||||||
m_cpuException = nullptr;
|
m_cpuException = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue