summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2023-12-10 20:50:58 +0100
committerJosJuice <josjuice@gmail.com>2023-12-10 21:07:27 +0100
commitc55f21729f03c1348259202f8db2dbfd8358c548 (patch)
treec89af738cf92c56291ba7bf905674bbf96361e19 /Source/Core
parentdb1620db423d590cb862fdc6f0dc866336f0d6f5 (diff)
Add "large entry points map" setting
To aid in debugging, this makes it possible to disable the recently added 32/64 GiB region which hasn't had a proper name so far.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Config/MainSettings.cpp1
-rw-r--r--Source/Core/Core/Config/MainSettings.h1
-rw-r--r--Source/Core/Core/PowerPC/JitCommon/JitCache.cpp6
-rw-r--r--Source/Core/DolphinQt/MenuBar.cpp9
-rw-r--r--Source/Core/DolphinQt/MenuBar.h1
5 files changed, 15 insertions, 3 deletions
diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp
index c9b39b7381..21c453b6c7 100644
--- a/Source/Core/Core/Config/MainSettings.cpp
+++ b/Source/Core/Core/Config/MainSettings.cpp
@@ -40,6 +40,7 @@ const Info<PowerPC::CPUCore> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"},
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_LARGE_ENTRY_POINTS_MAP{{System::Main, "Core", "LargeEntryPointsMap"}, 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};
diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h
index 5994a9bfd1..dddda8ae7a 100644
--- a/Source/Core/Core/Config/MainSettings.h
+++ b/Source/Core/Core/Config/MainSettings.h
@@ -57,6 +57,7 @@ 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_LARGE_ENTRY_POINTS_MAP;
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;
diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp
index af3842929f..327ee108a0 100644
--- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp
+++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp
@@ -42,10 +42,10 @@ void JitBaseBlockCache::Init()
{
Common::JitRegister::Init(Config::Get(Config::MAIN_PERF_MAP_DIR));
-#ifdef _ARCH_64
- m_entry_points_ptr = reinterpret_cast<u8**>(m_entry_points_arena.Create(FAST_BLOCK_MAP_SIZE));
-#else
m_entry_points_ptr = nullptr;
+#ifdef _ARCH_64
+ if (Config::Get(Config::MAIN_LARGE_ENTRY_POINTS_MAP))
+ m_entry_points_ptr = reinterpret_cast<u8**>(m_entry_points_arena.Create(FAST_BLOCK_MAP_SIZE));
#endif
Clear();
diff --git a/Source/Core/DolphinQt/MenuBar.cpp b/Source/Core/DolphinQt/MenuBar.cpp
index 9b400e7c2a..a31465aac1 100644
--- a/Source/Core/DolphinQt/MenuBar.cpp
+++ b/Source/Core/DolphinQt/MenuBar.cpp
@@ -153,6 +153,7 @@ void MenuBar::OnEmulationStateChanged(Core::State state)
m_jit_block_linking->setEnabled(!running);
m_jit_disable_cache->setEnabled(!running);
m_jit_disable_fastmem_arena->setEnabled(!running);
+ m_jit_disable_large_entry_points_map->setEnabled(!running);
m_jit_clear_cache->setEnabled(running);
m_jit_log_coverage->setEnabled(!running);
m_jit_search_instruction->setEnabled(running);
@@ -867,6 +868,14 @@ void MenuBar::AddJITMenu()
connect(m_jit_disable_fastmem_arena, &QAction::toggled,
[](bool enabled) { Config::SetBaseOrCurrent(Config::MAIN_FASTMEM_ARENA, !enabled); });
+ m_jit_disable_large_entry_points_map = m_jit->addAction(tr("Disable Large Entry Points Map"));
+ m_jit_disable_large_entry_points_map->setCheckable(true);
+ m_jit_disable_large_entry_points_map->setChecked(
+ !Config::Get(Config::MAIN_LARGE_ENTRY_POINTS_MAP));
+ connect(m_jit_disable_large_entry_points_map, &QAction::toggled, [](bool enabled) {
+ Config::SetBaseOrCurrent(Config::MAIN_LARGE_ENTRY_POINTS_MAP, !enabled);
+ });
+
m_jit_clear_cache = m_jit->addAction(tr("Clear Cache"), this, &MenuBar::ClearCache);
m_jit->addSeparator();
diff --git a/Source/Core/DolphinQt/MenuBar.h b/Source/Core/DolphinQt/MenuBar.h
index e505160afa..3830b22f34 100644
--- a/Source/Core/DolphinQt/MenuBar.h
+++ b/Source/Core/DolphinQt/MenuBar.h
@@ -265,6 +265,7 @@ private:
QAction* m_jit_disable_cache;
QAction* m_jit_disable_fastmem;
QAction* m_jit_disable_fastmem_arena;
+ QAction* m_jit_disable_large_entry_points_map;
QAction* m_jit_clear_cache;
QAction* m_jit_log_coverage;
QAction* m_jit_search_instruction;