diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp index 1aab34e7ee..c340d228ea 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.cpp @@ -174,8 +174,6 @@ namespace CPUCompare void Jit64::Init() { asm_routines.compareEnabled = ::Core::g_CoreStartupParameter.bRunCompareClient; - if (Core::g_CoreStartupParameter.bJITUnlimitedCache) - CODE_SIZE = 1024*1024*8*8; jo.optimizeStack = true; jo.enableBlocklink = false; // Speed boost, but not 100% safe @@ -193,6 +191,12 @@ namespace CPUCompare gpr.SetEmitter(this); fpr.SetEmitter(this); + // Custom settings + if (Core::g_CoreStartupParameter.bJITUnlimitedCache) + CODE_SIZE = 1024*1024*8*8; + if (Core::g_CoreStartupParameter.bJITBlockLinking) + { jo.enableBlocklink = true; SuccessAlert("Your game was started with JIT Block Linking"); } + trampolines.Init(); AllocCodeSpace(CODE_SIZE); diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index e67976c262..d60a8a4bbf 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -467,13 +467,19 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam , wxITEM_CHECK); automaticstart->Check(bAutomaticStart); - #ifdef JIT_OFF_OPTIONS pCoreMenu->AppendSeparator(); + + jitblocklinking = pCoreMenu->Append(IDM_JITBLOCKLINKING, _T("&JIT Block Linking"), + _T("Speed up the execution by linking the JIT blocks." + ), wxITEM_CHECK); + jitunlimited = pCoreMenu->Append(IDM_JITUNLIMITED, _T("&Unlimited JIT Cache"), _T("Avoid any involuntary JIT cache clearing, this may prevent Zelda TP from crashing." " [This option must be selected before a game is started.]" - ), - wxITEM_CHECK); + ), wxITEM_CHECK); + + + #ifdef JIT_OFF_OPTIONS pCoreMenu->AppendSeparator(); jitoff = pCoreMenu->Append(IDM_JITOFF, _T("&JIT off (JIT core)"), _T("Turn off all JIT functions, but still use the JIT core from Jit.cpp"), @@ -602,6 +608,11 @@ bool CCodeWindow::UnlimitedJITCache() { return GetMenuBar()->IsChecked(IDM_JITUNLIMITED); } + +bool CCodeWindow::JITBlockLinking() +{ + return GetMenuBar()->IsChecked(IDM_JITBLOCKLINKING); +} // ========================= diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.h b/Source/Core/DebuggerWX/Src/CodeWindow.h index d91b4fbf83..e302026896 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.h +++ b/Source/Core/DebuggerWX/Src/CodeWindow.h @@ -62,6 +62,7 @@ class CCodeWindow bool BootToPause(); bool AutomaticStart(); bool UnlimitedJITCache(); + bool JITBlockLinking(); //bool UseDualCore(); // not used void JumpToAddress(u32 _Address); @@ -75,7 +76,8 @@ class CCodeWindow IDM_INTERPRETER = 2000, // These cannot interfere with enums in Globals.h! //IDM_DUALCORE, // not used IDM_AUTOMATICSTART, IDM_BOOTTOPAUSE, - IDM_JITUNLIMITED, IDM_JITOFF, // jit + IDM_JITUNLIMITED, IDM_JITBLOCKLINKING, // JIT + IDM_JITOFF, IDM_JITLSOFF, IDM_JITLSLXZOFF, IDM_JITLSLWZOFF, IDM_JITLSLBZXOFF, IDM_JITLSPOFF, IDM_JITLSFOFF, IDM_JITIOFF, @@ -161,7 +163,7 @@ class CCodeWindow CMemoryWindow* m_MemoryWindow; CJitWindow* m_JitWindow; - wxMenuItem* jitunlimited, *jitoff; + wxMenuItem* jitblocklinking, *jitunlimited, *jitoff; wxMenuItem* jitlsoff, *jitlslxzoff, *jitlslwzoff, *jitlslbzxoff; wxMenuItem* jitlspoff; wxMenuItem* jitlsfoff; diff --git a/Source/Core/DolphinWX/Src/BootManager.cpp b/Source/Core/DolphinWX/Src/BootManager.cpp index 3abbca6e3a..18054d54ad 100644 --- a/Source/Core/DolphinWX/Src/BootManager.cpp +++ b/Source/Core/DolphinWX/Src/BootManager.cpp @@ -101,6 +101,7 @@ bool BootCore(const std::string& _rFilename) StartUp.bBootToPause = g_pCodeWindow->BootToPause(); StartUp.bAutomaticStart = g_pCodeWindow->AutomaticStart(); StartUp.bJITUnlimitedCache = g_pCodeWindow->UnlimitedJITCache(); + StartUp.bJITBlockLinking = g_pCodeWindow->JITBlockLinking(); } else {