mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 23:59:54 -06:00
PowerPC/Jit: Create fastmem arena on init.
This commit is contained in:
@ -216,9 +216,6 @@ void Init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Move this to the Jit
|
|
||||||
InitFastmemArena();
|
|
||||||
|
|
||||||
if (wii)
|
if (wii)
|
||||||
mmio_mapping = InitMMIOWii();
|
mmio_mapping = InitMMIOWii();
|
||||||
else
|
else
|
||||||
|
@ -333,6 +333,7 @@ void Jit64::Init()
|
|||||||
InitializeInstructionTables();
|
InitializeInstructionTables();
|
||||||
EnableBlockLink();
|
EnableBlockLink();
|
||||||
|
|
||||||
|
jo.fastmem_arena = SConfig::GetInstance().bFastmem && Memory::InitFastmemArena();
|
||||||
jo.optimizeGatherPipe = true;
|
jo.optimizeGatherPipe = true;
|
||||||
jo.accurateSinglePrecision = true;
|
jo.accurateSinglePrecision = true;
|
||||||
UpdateMemoryOptions();
|
UpdateMemoryOptions();
|
||||||
@ -393,6 +394,8 @@ void Jit64::Shutdown()
|
|||||||
FreeStack();
|
FreeStack();
|
||||||
FreeCodeSpace();
|
FreeCodeSpace();
|
||||||
|
|
||||||
|
Memory::ShutdownFastmemArena();
|
||||||
|
|
||||||
blocks.Shutdown();
|
blocks.Shutdown();
|
||||||
m_far_code.Shutdown();
|
m_far_code.Shutdown();
|
||||||
m_const_pool.Shutdown();
|
m_const_pool.Shutdown();
|
||||||
|
@ -49,6 +49,8 @@ void JitArm64::Init()
|
|||||||
size_t child_code_size = SConfig::GetInstance().bMMU ? FARCODE_SIZE_MMU : FARCODE_SIZE;
|
size_t child_code_size = SConfig::GetInstance().bMMU ? FARCODE_SIZE_MMU : FARCODE_SIZE;
|
||||||
AllocCodeSpace(CODE_SIZE + child_code_size);
|
AllocCodeSpace(CODE_SIZE + child_code_size);
|
||||||
AddChildCodeSpace(&farcode, child_code_size);
|
AddChildCodeSpace(&farcode, child_code_size);
|
||||||
|
|
||||||
|
jo.fastmem_arena = SConfig::GetInstance().bFastmem && Memory::InitFastmemArena();
|
||||||
jo.enableBlocklink = true;
|
jo.enableBlocklink = true;
|
||||||
jo.optimizeGatherPipe = true;
|
jo.optimizeGatherPipe = true;
|
||||||
UpdateMemoryOptions();
|
UpdateMemoryOptions();
|
||||||
@ -133,6 +135,7 @@ void JitArm64::ClearCache()
|
|||||||
|
|
||||||
void JitArm64::Shutdown()
|
void JitArm64::Shutdown()
|
||||||
{
|
{
|
||||||
|
Memory::ShutdownFastmemArena();
|
||||||
FreeCodeSpace();
|
FreeCodeSpace();
|
||||||
blocks.Shutdown();
|
blocks.Shutdown();
|
||||||
FreeStack();
|
FreeStack();
|
||||||
|
@ -45,6 +45,6 @@ bool JitBase::CanMergeNextInstructions(int count) const
|
|||||||
void JitBase::UpdateMemoryOptions()
|
void JitBase::UpdateMemoryOptions()
|
||||||
{
|
{
|
||||||
bool any_watchpoints = PowerPC::memchecks.HasAny();
|
bool any_watchpoints = PowerPC::memchecks.HasAny();
|
||||||
jo.fastmem = SConfig::GetInstance().bFastmem && (MSR.DR || !any_watchpoints);
|
jo.fastmem = SConfig::GetInstance().bFastmem && jo.fastmem_arena && (MSR.DR || !any_watchpoints);
|
||||||
jo.memcheck = SConfig::GetInstance().bMMU || any_watchpoints;
|
jo.memcheck = SConfig::GetInstance().bMMU || any_watchpoints;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ protected:
|
|||||||
bool optimizeGatherPipe;
|
bool optimizeGatherPipe;
|
||||||
bool accurateSinglePrecision;
|
bool accurateSinglePrecision;
|
||||||
bool fastmem;
|
bool fastmem;
|
||||||
|
bool fastmem_arena;
|
||||||
bool memcheck;
|
bool memcheck;
|
||||||
bool profile_blocks;
|
bool profile_blocks;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user