Debug: fix disable block linking option

Previously it did the opposite of what it was supposed to; when checked, it'd
turn block linking on, and when unchecked, it'd turn it off.

Also update JITIL's block linking disabling in debug mode to match the behavior
of the regular JIT.
This commit is contained in:
Fiora 2014-10-08 19:02:02 -07:00
parent 2423b9b2bd
commit 8bf2cf0641
8 changed files with 14 additions and 25 deletions

View File

@ -23,7 +23,7 @@
SCoreStartupParameter::SCoreStartupParameter()
: bEnableDebugging(false), bAutomaticStart(false), bBootToPause(false),
bJITNoBlockCache(false), bJITBlockLinking(true),
bJITNoBlockCache(false), bJITNoBlockLinking(true),
bJITOff(false),
bJITLoadStoreOff(false), bJITLoadStorelXzOff(false),
bJITLoadStorelwzOff(false), bJITLoadStorelbzxOff(false),

View File

@ -123,7 +123,7 @@ struct SCoreStartupParameter
int iCPUCore;
// JIT (shared between JIT and JITIL)
bool bJITNoBlockCache, bJITBlockLinking;
bool bJITNoBlockCache, bJITNoBlockLinking;
bool bJITOff;
bool bJITLoadStoreOff, bJITLoadStorelXzOff, bJITLoadStorelwzOff, bJITLoadStorelbzxOff;
bool bJITLoadStoreFloatingOff;

View File

@ -175,7 +175,7 @@ void Jit64::Init()
{
jo.optimizeStack = true;
jo.enableBlocklink = true;
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bJITBlockLinking ||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockLinking ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
{
// TODO: support block linking with MMU

View File

@ -244,23 +244,12 @@ namespace JitILProfiler
void JitIL::Init()
{
jo.optimizeStack = true;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
jo.enableBlocklink = true;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockLinking ||
SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
{
// TODO: support block linking with MMU
jo.enableBlocklink = false;
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = false;
}
else
{
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bJITBlockLinking)
{
jo.enableBlocklink = false;
}
else
{
// Speed boost, but not 100% safe
jo.enableBlocklink = !SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
}
}
jo.fpAccurateFcmp = false;

View File

@ -397,7 +397,7 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
interpreter->Check(_LocalCoreStartupParameter.iCPUCore == 0);
pCoreMenu->AppendSeparator();
pCoreMenu->Append(IDM_JITBLOCKLINKING, _("&JIT Block Linking off"),
pCoreMenu->Append(IDM_JITNOBLOCKLINKING, _("&JIT Block Linking off"),
_("Provide safer execution by not linking the JIT blocks."),
wxITEM_CHECK);
@ -596,9 +596,9 @@ bool CCodeWindow::JITNoBlockCache()
return GetMenuBar()->IsChecked(IDM_JITNOBLOCKCACHE);
}
bool CCodeWindow::JITBlockLinking()
bool CCodeWindow::JITNoBlockLinking()
{
return GetMenuBar()->IsChecked(IDM_JITBLOCKLINKING);
return GetMenuBar()->IsChecked(IDM_JITNOBLOCKLINKING);
}
// Toolbar

View File

@ -59,7 +59,7 @@ class CCodeWindow
bool BootToPause();
bool AutomaticStart();
bool JITNoBlockCache();
bool JITBlockLinking();
bool JITNoBlockLinking();
bool JumpToAddress(u32 address);
void Update() override;

View File

@ -191,7 +191,7 @@ enum
// CPU Mode
IDM_INTERPRETER,
IDM_AUTOMATICSTART, IDM_BOOTTOPAUSE,
IDM_JITNOBLOCKCACHE, IDM_JITBLOCKLINKING, // JIT
IDM_JITNOBLOCKCACHE, IDM_JITNOBLOCKLINKING, // JIT
IDM_JITOFF,
IDM_JITLSOFF, IDM_JITLSLXZOFF, IDM_JITLSLWZOFF, IDM_JITLSLBZXOFF,
IDM_JITLSPOFF, IDM_JITLSFOFF,

View File

@ -559,7 +559,7 @@ void Host_SetStartupDebuggingParameters()
StartUp.bBootToPause = main_frame->g_pCodeWindow->BootToPause();
StartUp.bAutomaticStart = main_frame->g_pCodeWindow->AutomaticStart();
StartUp.bJITNoBlockCache = main_frame->g_pCodeWindow->JITNoBlockCache();
StartUp.bJITBlockLinking = main_frame->g_pCodeWindow->JITBlockLinking();
StartUp.bJITNoBlockLinking = main_frame->g_pCodeWindow->JITNoBlockLinking();
}
else
{