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

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,