Config: Port Debug settings to new config system.

This commit is contained in:
Admiral H. Curtiss 2021-12-28 03:20:28 +01:00
parent 33d0442604
commit 810dcfa0f6
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
11 changed files with 119 additions and 98 deletions

View File

@ -274,4 +274,28 @@ const Info<bool> MAIN_MOVIE_SHOW_RERECORD{{System::Main, "Movie", "ShowRerecord"
const Info<bool> MAIN_INPUT_BACKGROUND_INPUT{{System::Main, "Input", "BackgroundInput"}, false};
// Main.Debug
const Info<bool> MAIN_DEBUG_JIT_OFF{{System::Main, "Debug", "JitOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_OFF{{System::Main, "Debug", "JitLoadStoreOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF{{System::Main, "Debug", "JitLoadStorelXzOff"},
false};
const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_LWZ_OFF{{System::Main, "Debug", "JitLoadStorelwzOff"},
false};
const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_LBZX_OFF{{System::Main, "Debug", "JitLoadStorelbzxOff"},
false};
const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_FLOATING_OFF{
{System::Main, "Debug", "JitLoadStoreFloatingOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_PAIRED_OFF{
{System::Main, "Debug", "JitLoadStorePairedOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_FLOATING_POINT_OFF{{System::Main, "Debug", "JitFloatingPointOff"},
false};
const Info<bool> MAIN_DEBUG_JIT_INTEGER_OFF{{System::Main, "Debug", "JitIntegerOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_PAIRED_OFF{{System::Main, "Debug", "JitPairedOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_SYSTEM_REGISTERS_OFF{
{System::Main, "Debug", "JitSystemRegistersOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_BRANCH_OFF{{System::Main, "Debug", "JitBranchOff"}, false};
const Info<bool> MAIN_DEBUG_JIT_REGISTER_CACHE_OFF{{System::Main, "Debug", "JitRegisterCacheOff"},
false};
} // namespace Config

View File

@ -234,4 +234,20 @@ extern const Info<bool> MAIN_MOVIE_SHOW_RERECORD;
extern const Info<bool> MAIN_INPUT_BACKGROUND_INPUT;
// Main.Debug
extern const Info<bool> MAIN_DEBUG_JIT_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_LWZ_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_LBZX_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_FLOATING_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_LOAD_STORE_PAIRED_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_FLOATING_POINT_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_INTEGER_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_PAIRED_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_SYSTEM_REGISTERS_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_BRANCH_OFF;
extern const Info<bool> MAIN_DEBUG_JIT_REGISTER_CACHE_OFF;
} // namespace Config

View File

@ -27,7 +27,7 @@ bool IsSettingSaveable(const Config::Location& config_location)
{
for (const std::string_view section :
{"NetPlay", "General", "GBA", "Display", "Network", "Analytics", "AndroidOverlayButtons",
"DSP", "GameList", "FifoPlayer", "AutoUpdate", "Movie", "Input"})
"DSP", "GameList", "FifoPlayer", "AutoUpdate", "Movie", "Input", "Debug"})
{
if (config_location.section == section)
return true;

View File

@ -93,7 +93,6 @@ void SConfig::SaveSettings()
SaveCoreSettings(ini);
SaveBluetoothPassthroughSettings(ini);
SaveUSBPassthroughSettings(ini);
SaveJitDebugSettings(ini);
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
@ -221,22 +220,6 @@ void SConfig::SaveUSBPassthroughSettings(IniFile& ini)
section->Set("Devices", devices_string);
}
void SConfig::SaveJitDebugSettings(IniFile& ini)
{
IniFile::Section* section = ini.GetOrCreateSection("Debug");
section->Set("JitOff", bJITOff);
section->Set("JitLoadStoreOff", bJITLoadStoreOff);
section->Set("JitLoadStoreFloatingOff", bJITLoadStoreFloatingOff);
section->Set("JitLoadStorePairedOff", bJITLoadStorePairedOff);
section->Set("JitFloatingPointOff", bJITFloatingPointOff);
section->Set("JitIntegerOff", bJITIntegerOff);
section->Set("JitPairedOff", bJITPairedOff);
section->Set("JitSystemRegistersOff", bJITSystemRegistersOff);
section->Set("JitBranchOff", bJITBranchOff);
section->Set("JitRegisterCacheOff", bJITRegisterCacheOff);
}
void SConfig::LoadSettings()
{
Config::Load();
@ -250,7 +233,6 @@ void SConfig::LoadSettings()
LoadCoreSettings(ini);
LoadBluetoothPassthroughSettings(ini);
LoadUSBPassthroughSettings(ini);
LoadJitDebugSettings(ini);
}
void SConfig::LoadGeneralSettings(IniFile& ini)
@ -388,21 +370,6 @@ void SConfig::LoadUSBPassthroughSettings(IniFile& ini)
}
}
void SConfig::LoadJitDebugSettings(IniFile& ini)
{
IniFile::Section* section = ini.GetOrCreateSection("Debug");
section->Get("JitOff", &bJITOff, false);
section->Get("JitLoadStoreOff", &bJITLoadStoreOff, false);
section->Get("JitLoadStoreFloatingOff", &bJITLoadStoreFloatingOff, false);
section->Get("JitLoadStorePairedOff", &bJITLoadStorePairedOff, false);
section->Get("JitFloatingPointOff", &bJITFloatingPointOff, false);
section->Get("JitIntegerOff", &bJITIntegerOff, false);
section->Get("JitPairedOff", &bJITPairedOff, false);
section->Get("JitSystemRegistersOff", &bJITSystemRegistersOff, false);
section->Get("JitBranchOff", &bJITBranchOff, false);
section->Get("JitRegisterCacheOff", &bJITRegisterCacheOff, false);
}
void SConfig::ResetRunningGameMetadata()
{
SetRunningGameMetadata("00000000", "", 0, 0, DiscIO::Region::Unknown);
@ -542,17 +509,6 @@ void SConfig::LoadDefaults()
bOverrideRegionSettings = false;
bWii = false;
bJITOff = false; // debugger only settings
bJITLoadStoreOff = false;
bJITLoadStoreFloatingOff = false;
bJITLoadStorePairedOff = false;
bJITFloatingPointOff = false;
bJITIntegerOff = false;
bJITPairedOff = false;
bJITSystemRegistersOff = false;
bJITBranchOff = false;
bJITRegisterCacheOff = false;
ResetRunningGameMetadata();
}

View File

@ -82,19 +82,6 @@ struct SConfig
bool bJITFollowBranch;
bool bJITNoBlockCache = false;
bool bJITNoBlockLinking = false;
bool bJITOff = false;
bool bJITLoadStoreOff = false;
bool bJITLoadStorelXzOff = false;
bool bJITLoadStorelwzOff = false;
bool bJITLoadStorelbzxOff = false;
bool bJITLoadStoreFloatingOff = false;
bool bJITLoadStorePairedOff = false;
bool bJITFloatingPointOff = false;
bool bJITIntegerOff = false;
bool bJITPairedOff = false;
bool bJITSystemRegistersOff = false;
bool bJITBranchOff = false;
bool bJITRegisterCacheOff = false;
bool bFastmem;
bool bFloatExceptions = false;
@ -258,14 +245,12 @@ private:
void SaveCoreSettings(IniFile& ini);
void SaveBluetoothPassthroughSettings(IniFile& ini);
void SaveUSBPassthroughSettings(IniFile& ini);
void SaveJitDebugSettings(IniFile& ini);
void LoadGeneralSettings(IniFile& ini);
void LoadInterfaceSettings(IniFile& ini);
void LoadCoreSettings(IniFile& ini);
void LoadBluetoothPassthroughSettings(IniFile& ini);
void LoadUSBPassthroughSettings(IniFile& ini);
void LoadJitDebugSettings(IniFile& ini);
void SetRunningGameMetadata(const std::string& game_id, const std::string& gametdb_id,
u64 title_id, u16 revision, DiscIO::Region region);

View File

@ -1116,7 +1116,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
SetJumpTarget(noBreakpoint);
}
if (SConfig::GetInstance().bJITRegisterCacheOff)
if (bJITRegisterCacheOff)
{
gpr.Flush();
fpr.Flush();
@ -1180,7 +1180,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
fpr.Commit();
// If we have a register that will never be used again, discard or flush it.
if (!SConfig::GetInstance().bJITRegisterCacheOff)
if (!bJITRegisterCacheOff)
{
gpr.Discard(op.gprDiscardable);
fpr.Discard(op.fprDiscardable);

View File

@ -33,11 +33,9 @@ void Jit64::lXXx(UGeckoInstruction inst)
int a = inst.RA, b = inst.RB, d = inst.RD;
// Skip disabled JIT instructions
FALLBACK_IF(SConfig::GetInstance().bJITLoadStorelbzxOff && (inst.OPCD == 31) &&
(inst.SUBOP10 == 87));
FALLBACK_IF(SConfig::GetInstance().bJITLoadStorelXzOff &&
((inst.OPCD == 34) || (inst.OPCD == 40) || (inst.OPCD == 32)));
FALLBACK_IF(SConfig::GetInstance().bJITLoadStorelwzOff && (inst.OPCD == 32));
FALLBACK_IF(bJITLoadStorelbzxOff && (inst.OPCD == 31) && (inst.SUBOP10 == 87));
FALLBACK_IF(bJITLoadStorelXzOff && ((inst.OPCD == 34) || (inst.OPCD == 40) || (inst.OPCD == 32)));
FALLBACK_IF(bJITLoadStorelwzOff && (inst.OPCD == 32));
// Determine memory access size and sign extend
int accessSize = 0;

View File

@ -950,7 +950,7 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
js.firstFPInstructionFound = true;
}
if (SConfig::GetInstance().bJITRegisterCacheOff)
if (bJITRegisterCacheOff)
{
gpr.Flush(FlushMode::All, ARM64Reg::INVALID_REG);
fpr.Flush(FlushMode::All, ARM64Reg::INVALID_REG);
@ -965,7 +965,7 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
FlushCarry();
// If we have a register that will never be used again, discard or flush it.
if (!SConfig::GetInstance().bJITRegisterCacheOff)
if (!bJITRegisterCacheOff)
{
gpr.DiscardRegisters(op.gprDiscardable);
fpr.DiscardRegisters(op.fprDiscardable);

View File

@ -4,7 +4,9 @@
#include "Core/PowerPC/JitCommon/JitBase.h"
#include "Common/CommonTypes.h"
#include "Core/Config/MainSettings.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/HW/CPU.h"
#include "Core/PowerPC/PPCAnalyst.h"
#include "Core/PowerPC/PowerPC.h"
@ -21,9 +23,32 @@ void JitTrampoline(JitBase& jit, u32 em_address)
JitBase::JitBase() : m_code_buffer(code_buffer_size)
{
m_registered_config_callback_id = Config::AddConfigChangedCallback(
[this] { Core::RunAsCPUThread([this] { RefreshConfig(); }); });
RefreshConfig();
}
JitBase::~JitBase() = default;
JitBase::~JitBase()
{
Config::RemoveConfigChangedCallback(m_registered_config_callback_id);
}
void JitBase::RefreshConfig()
{
bJITOff = Config::Get(Config::MAIN_DEBUG_JIT_OFF);
bJITLoadStoreOff = Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_OFF);
bJITLoadStorelXzOff = Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF);
bJITLoadStorelwzOff = Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_LWZ_OFF);
bJITLoadStorelbzxOff = Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_LBZX_OFF);
bJITLoadStoreFloatingOff = Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_FLOATING_OFF);
bJITLoadStorePairedOff = Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_PAIRED_OFF);
bJITFloatingPointOff = Config::Get(Config::MAIN_DEBUG_JIT_FLOATING_POINT_OFF);
bJITIntegerOff = Config::Get(Config::MAIN_DEBUG_JIT_INTEGER_OFF);
bJITPairedOff = Config::Get(Config::MAIN_DEBUG_JIT_PAIRED_OFF);
bJITSystemRegistersOff = Config::Get(Config::MAIN_DEBUG_JIT_SYSTEM_REGISTERS_OFF);
bJITBranchOff = Config::Get(Config::MAIN_DEBUG_JIT_BRANCH_OFF);
bJITRegisterCacheOff = Config::Get(Config::MAIN_DEBUG_JIT_REGISTER_CACHE_OFF);
}
bool JitBase::CanMergeNextInstructions(int count) const
{

View File

@ -36,8 +36,7 @@
} \
} while (0)
#define JITDISABLE(setting) \
FALLBACK_IF(SConfig::GetInstance().bJITOff || SConfig::GetInstance().setting)
#define JITDISABLE(setting) FALLBACK_IF(bJITOff || setting)
class JitBase : public CPUCoreBase
{
@ -113,6 +112,23 @@ protected:
PPCAnalyst::CodeBuffer m_code_buffer;
PPCAnalyst::PPCAnalyzer analyzer;
size_t m_registered_config_callback_id;
bool bJITOff = false;
bool bJITLoadStoreOff = false;
bool bJITLoadStorelXzOff = false;
bool bJITLoadStorelwzOff = false;
bool bJITLoadStorelbzxOff = false;
bool bJITLoadStoreFloatingOff = false;
bool bJITLoadStorePairedOff = false;
bool bJITFloatingPointOff = false;
bool bJITIntegerOff = false;
bool bJITPairedOff = false;
bool bJITSystemRegistersOff = false;
bool bJITBranchOff = false;
bool bJITRegisterCacheOff = false;
void RefreshConfig();
bool CanMergeNextInstructions(int count) const;
void UpdateMemoryAndExceptionOptions();

View File

@ -848,105 +848,106 @@ void MenuBar::AddJITMenu()
m_jit_off = m_jit->addAction(tr("JIT Off (JIT Core)"));
m_jit_off->setCheckable(true);
m_jit_off->setChecked(SConfig::GetInstance().bJITOff);
m_jit_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_OFF));
connect(m_jit_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_OFF, enabled);
ClearCache();
});
m_jit_loadstore_off = m_jit->addAction(tr("JIT LoadStore Off"));
m_jit_loadstore_off->setCheckable(true);
m_jit_loadstore_off->setChecked(SConfig::GetInstance().bJITLoadStoreOff);
m_jit_loadstore_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_OFF));
connect(m_jit_loadstore_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITLoadStoreOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_LOAD_STORE_OFF, enabled);
ClearCache();
});
m_jit_loadstore_lbzx_off = m_jit->addAction(tr("JIT LoadStore lbzx Off"));
m_jit_loadstore_lbzx_off->setCheckable(true);
m_jit_loadstore_lbzx_off->setChecked(SConfig::GetInstance().bJITLoadStorelbzxOff);
m_jit_loadstore_lbzx_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_LBZX_OFF));
connect(m_jit_loadstore_lbzx_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITLoadStorelbzxOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_LOAD_STORE_LBZX_OFF, enabled);
ClearCache();
});
m_jit_loadstore_lxz_off = m_jit->addAction(tr("JIT LoadStore lXz Off"));
m_jit_loadstore_lxz_off->setCheckable(true);
m_jit_loadstore_lxz_off->setChecked(SConfig::GetInstance().bJITLoadStorelXzOff);
m_jit_loadstore_lxz_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF));
connect(m_jit_loadstore_lxz_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITLoadStorelXzOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF, enabled);
ClearCache();
});
m_jit_loadstore_lwz_off = m_jit->addAction(tr("JIT LoadStore lwz Off"));
m_jit_loadstore_lwz_off->setCheckable(true);
m_jit_loadstore_lwz_off->setChecked(SConfig::GetInstance().bJITLoadStorelwzOff);
m_jit_loadstore_lwz_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_LWZ_OFF));
connect(m_jit_loadstore_lwz_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITLoadStorelwzOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_LOAD_STORE_LWZ_OFF, enabled);
ClearCache();
});
m_jit_loadstore_floating_off = m_jit->addAction(tr("JIT LoadStore Floating Off"));
m_jit_loadstore_floating_off->setCheckable(true);
m_jit_loadstore_floating_off->setChecked(SConfig::GetInstance().bJITLoadStoreFloatingOff);
m_jit_loadstore_floating_off->setChecked(
Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_FLOATING_OFF));
connect(m_jit_loadstore_floating_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITLoadStoreFloatingOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_LOAD_STORE_FLOATING_OFF, enabled);
ClearCache();
});
m_jit_loadstore_paired_off = m_jit->addAction(tr("JIT LoadStore Paired Off"));
m_jit_loadstore_paired_off->setCheckable(true);
m_jit_loadstore_paired_off->setChecked(SConfig::GetInstance().bJITLoadStorePairedOff);
m_jit_loadstore_paired_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_LOAD_STORE_PAIRED_OFF));
connect(m_jit_loadstore_paired_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITLoadStorePairedOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_LOAD_STORE_PAIRED_OFF, enabled);
ClearCache();
});
m_jit_floatingpoint_off = m_jit->addAction(tr("JIT FloatingPoint Off"));
m_jit_floatingpoint_off->setCheckable(true);
m_jit_floatingpoint_off->setChecked(SConfig::GetInstance().bJITFloatingPointOff);
m_jit_floatingpoint_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_FLOATING_POINT_OFF));
connect(m_jit_floatingpoint_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITFloatingPointOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_FLOATING_POINT_OFF, enabled);
ClearCache();
});
m_jit_integer_off = m_jit->addAction(tr("JIT Integer Off"));
m_jit_integer_off->setCheckable(true);
m_jit_integer_off->setChecked(SConfig::GetInstance().bJITIntegerOff);
m_jit_integer_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_INTEGER_OFF));
connect(m_jit_integer_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITIntegerOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_INTEGER_OFF, enabled);
ClearCache();
});
m_jit_paired_off = m_jit->addAction(tr("JIT Paired Off"));
m_jit_paired_off->setCheckable(true);
m_jit_paired_off->setChecked(SConfig::GetInstance().bJITPairedOff);
m_jit_paired_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_PAIRED_OFF));
connect(m_jit_paired_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITPairedOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_PAIRED_OFF, enabled);
ClearCache();
});
m_jit_systemregisters_off = m_jit->addAction(tr("JIT SystemRegisters Off"));
m_jit_systemregisters_off->setCheckable(true);
m_jit_systemregisters_off->setChecked(SConfig::GetInstance().bJITSystemRegistersOff);
m_jit_systemregisters_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_SYSTEM_REGISTERS_OFF));
connect(m_jit_systemregisters_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITSystemRegistersOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_SYSTEM_REGISTERS_OFF, enabled);
ClearCache();
});
m_jit_branch_off = m_jit->addAction(tr("JIT Branch Off"));
m_jit_branch_off->setCheckable(true);
m_jit_branch_off->setChecked(SConfig::GetInstance().bJITBranchOff);
m_jit_branch_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_BRANCH_OFF));
connect(m_jit_branch_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITBranchOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_BRANCH_OFF, enabled);
ClearCache();
});
m_jit_register_cache_off = m_jit->addAction(tr("JIT Register Cache Off"));
m_jit_register_cache_off->setCheckable(true);
m_jit_register_cache_off->setChecked(SConfig::GetInstance().bJITRegisterCacheOff);
m_jit_register_cache_off->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_REGISTER_CACHE_OFF));
connect(m_jit_register_cache_off, &QAction::toggled, [this](bool enabled) {
SConfig::GetInstance().bJITRegisterCacheOff = enabled;
Config::SetBaseOrCurrent(Config::MAIN_DEBUG_JIT_REGISTER_CACHE_OFF, enabled);
ClearCache();
});
}