CPU/Recompiler: Use fastmem for constant loads from RAM mirrors in LUT mode

This commit is contained in:
Connor McLaughlin 2021-02-18 17:45:55 +10:00
parent 9d05aa2145
commit 67fe97a17c
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ Value CodeGenerator::EmitLoadGuestMemory(const CodeBlockInstruction& cbi, const
{
Value result = m_register_cache.AllocateScratch(size);
if (g_settings.IsUsingFastmem() && Bus::IsRAMAddress(static_cast<u32>(address.constant_value)))
if (g_settings.cpu_fastmem_mode == CPUFastmemMode::MMap &&
Bus::IsRAMAddress(static_cast<u32>(address.constant_value)))
{
// have to mask away the high bits for mirrors, since we don't map them in fastmem
EmitLoadGuestRAMFastmem(Value::FromConstantU32(static_cast<u32>(address.constant_value) & Bus::RAM_MASK), size,