Add fastmem arena setting

Just for debugging.
This commit is contained in:
JosJuice
2023-10-01 22:54:09 +02:00
parent 8686536d7d
commit d04e67be3d
11 changed files with 31 additions and 4 deletions

View File

@ -38,6 +38,7 @@ const Info<PowerPC::CPUCore> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"},
PowerPC::DefaultCPUCore()};
const Info<bool> MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true};
const Info<bool> MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true};
const Info<bool> MAIN_FASTMEM_ARENA{{System::Main, "Core", "FastmemArena"}, true};
const Info<bool> MAIN_ACCURATE_CPU_CACHE{{System::Main, "Core", "AccurateCPUCache"}, false};
const Info<bool> MAIN_DSP_HLE{{System::Main, "Core", "DSPHLE"}, true};
const Info<int> MAIN_MAX_FALLBACK{{System::Main, "Core", "MaxFallback"}, 100};

View File

@ -56,6 +56,7 @@ extern const Info<bool> MAIN_SKIP_IPL;
extern const Info<PowerPC::CPUCore> MAIN_CPU_CORE;
extern const Info<bool> MAIN_JIT_FOLLOW_BRANCH;
extern const Info<bool> MAIN_FASTMEM;
extern const Info<bool> MAIN_FASTMEM_ARENA;
extern const Info<bool> MAIN_ACCURATE_CPU_CACHE;
// Should really be in the DSP section, but we're kind of stuck with bad decisions made in the past.
extern const Info<bool> MAIN_DSP_HLE;

View File

@ -251,8 +251,7 @@ bool Jit64::BackPatch(SContext* ctx)
void Jit64::Init()
{
auto& memory = m_system.GetMemory();
jo.fastmem_arena = memory.InitFastmemArena();
InitFastmemArena();
RefreshConfig();

View File

@ -47,8 +47,7 @@ JitArm64::~JitArm64() = default;
void JitArm64::Init()
{
auto& memory = m_system.GetMemory();
jo.fastmem_arena = memory.InitFastmemArena();
InitFastmemArena();
RefreshConfig();

View File

@ -140,6 +140,12 @@ void JitBase::RefreshConfig()
jo.div_by_zero_exceptions = m_enable_div_by_zero_exceptions;
}
void JitBase::InitFastmemArena()
{
auto& memory = m_system.GetMemory();
jo.fastmem_arena = Config::Get(Config::MAIN_FASTMEM_ARENA) && memory.InitFastmemArena();
}
void JitBase::InitBLROptimization()
{
m_enable_blr_optimization =

View File

@ -166,6 +166,8 @@ protected:
bool DoesConfigNeedRefresh();
void RefreshConfig();
void InitFastmemArena();
void InitBLROptimization();
void ProtectStack();
void UnprotectStack();