mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-21 18:05:20 -05:00
Core: Add INI-only setting for page table fastmem
This commit is contained in:
@@ -44,6 +44,7 @@ const Info<PowerPC::CPUCore> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"},
|
|||||||
PowerPC::DefaultCPUCore()};
|
PowerPC::DefaultCPUCore()};
|
||||||
const Info<bool> MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true};
|
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{{System::Main, "Core", "Fastmem"}, true};
|
||||||
|
const Info<bool> MAIN_PAGE_TABLE_FASTMEM{{System::Main, "Core", "PageTableFastmem"}, true};
|
||||||
const Info<bool> MAIN_FASTMEM_ARENA{{System::Main, "Core", "FastmemArena"}, 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_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_ACCURATE_CPU_CACHE{{System::Main, "Core", "AccurateCPUCache"}, false};
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ extern const Info<bool> MAIN_SKIP_IPL;
|
|||||||
extern const Info<PowerPC::CPUCore> MAIN_CPU_CORE;
|
extern const Info<PowerPC::CPUCore> MAIN_CPU_CORE;
|
||||||
extern const Info<bool> MAIN_JIT_FOLLOW_BRANCH;
|
extern const Info<bool> MAIN_JIT_FOLLOW_BRANCH;
|
||||||
extern const Info<bool> MAIN_FASTMEM;
|
extern const Info<bool> MAIN_FASTMEM;
|
||||||
|
extern const Info<bool> MAIN_PAGE_TABLE_FASTMEM;
|
||||||
extern const Info<bool> MAIN_FASTMEM_ARENA;
|
extern const Info<bool> MAIN_FASTMEM_ARENA;
|
||||||
extern const Info<bool> MAIN_LARGE_ENTRY_POINTS_MAP;
|
extern const Info<bool> MAIN_LARGE_ENTRY_POINTS_MAP;
|
||||||
extern const Info<bool> MAIN_ACCURATE_CPU_CACHE;
|
extern const Info<bool> MAIN_ACCURATE_CPU_CACHE;
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
// After resetting the stack to the top, we call _resetstkoflw() to restore
|
// After resetting the stack to the top, we call _resetstkoflw() to restore
|
||||||
// the guard page at the 256kb mark.
|
// the guard page at the 256kb mark.
|
||||||
|
|
||||||
const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JitBase::JIT_SETTINGS{{
|
const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 25> JitBase::JIT_SETTINGS{{
|
||||||
{&JitBase::bJITOff, &Config::MAIN_DEBUG_JIT_OFF},
|
{&JitBase::bJITOff, &Config::MAIN_DEBUG_JIT_OFF},
|
||||||
{&JitBase::bJITLoadStoreOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_OFF},
|
{&JitBase::bJITLoadStoreOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_OFF},
|
||||||
{&JitBase::bJITLoadStorelXzOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF},
|
{&JitBase::bJITLoadStorelXzOff, &Config::MAIN_DEBUG_JIT_LOAD_STORE_LXZ_OFF},
|
||||||
@@ -82,6 +82,7 @@ const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JitB
|
|||||||
{&JitBase::m_accurate_nans, &Config::MAIN_ACCURATE_NANS},
|
{&JitBase::m_accurate_nans, &Config::MAIN_ACCURATE_NANS},
|
||||||
{&JitBase::m_accurate_fmadds, &Config::MAIN_ACCURATE_FMADDS},
|
{&JitBase::m_accurate_fmadds, &Config::MAIN_ACCURATE_FMADDS},
|
||||||
{&JitBase::m_fastmem_enabled, &Config::MAIN_FASTMEM},
|
{&JitBase::m_fastmem_enabled, &Config::MAIN_FASTMEM},
|
||||||
|
{&JitBase::m_page_table_fastmem_enabled, &Config::MAIN_PAGE_TABLE_FASTMEM},
|
||||||
{&JitBase::m_accurate_cpu_cache_enabled, &Config::MAIN_ACCURATE_CPU_CACHE},
|
{&JitBase::m_accurate_cpu_cache_enabled, &Config::MAIN_ACCURATE_CPU_CACHE},
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -145,9 +146,9 @@ void JitBase::RefreshConfig()
|
|||||||
jo.fp_exceptions = m_enable_float_exceptions;
|
jo.fp_exceptions = m_enable_float_exceptions;
|
||||||
jo.div_by_zero_exceptions = m_enable_div_by_zero_exceptions;
|
jo.div_by_zero_exceptions = m_enable_div_by_zero_exceptions;
|
||||||
|
|
||||||
if (!wanted_page_table_mappings && WantsPageTableMappings())
|
if (wanted_page_table_mappings != WantsPageTableMappings())
|
||||||
{
|
{
|
||||||
// Mustn't call this if we're still initializing
|
// Mustn't call this if we're still initializing - it'll cause a crash
|
||||||
if (Core::IsRunning(m_system))
|
if (Core::IsRunning(m_system))
|
||||||
m_system.GetMMU().PageTableUpdated();
|
m_system.GetMMU().PageTableUpdated();
|
||||||
}
|
}
|
||||||
@@ -155,7 +156,7 @@ void JitBase::RefreshConfig()
|
|||||||
|
|
||||||
bool JitBase::WantsPageTableMappings() const
|
bool JitBase::WantsPageTableMappings() const
|
||||||
{
|
{
|
||||||
return jo.fastmem;
|
return jo.fastmem && m_page_table_fastmem_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void JitBase::InitFastmemArena()
|
void JitBase::InitFastmemArena()
|
||||||
|
|||||||
@@ -161,13 +161,14 @@ protected:
|
|||||||
bool m_accurate_nans = false;
|
bool m_accurate_nans = false;
|
||||||
bool m_accurate_fmadds = false;
|
bool m_accurate_fmadds = false;
|
||||||
bool m_fastmem_enabled = false;
|
bool m_fastmem_enabled = false;
|
||||||
|
bool m_page_table_fastmem_enabled = false;
|
||||||
bool m_accurate_cpu_cache_enabled = false;
|
bool m_accurate_cpu_cache_enabled = false;
|
||||||
|
|
||||||
bool m_enable_blr_optimization = false;
|
bool m_enable_blr_optimization = false;
|
||||||
bool m_cleanup_after_stackfault = false;
|
bool m_cleanup_after_stackfault = false;
|
||||||
u8* m_stack_guard = nullptr;
|
u8* m_stack_guard = nullptr;
|
||||||
|
|
||||||
static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 24> JIT_SETTINGS;
|
static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 25> JIT_SETTINGS;
|
||||||
|
|
||||||
bool DoesConfigNeedRefresh() const;
|
bool DoesConfigNeedRefresh() const;
|
||||||
void RefreshConfig();
|
void RefreshConfig();
|
||||||
|
|||||||
Reference in New Issue
Block a user