Jit64: Only activate dcbz fastpath with fastmem.

The code is safe not to create memory errors, but it accesses the fastmem area.
This commit is contained in:
degasus 2019-12-06 10:09:03 +01:00
parent c6019f9814
commit 74cb692591

View file

@ -304,7 +304,9 @@ void Jit64::dcbz(UGeckoInstruction inst)
AND(32, R(RSCRATCH), Imm32(~31));
}
if (MSR.DR)
bool emit_fast_path = MSR.DR && m_jit.jo.fastmem_arena;
if (emit_fast_path)
{
// Perform lookup to see if we can use fast path.
MOV(64, R(RSCRATCH2), ImmPtr(&PowerPC::dbat_table[0]));
@ -329,7 +331,7 @@ void Jit64::dcbz(UGeckoInstruction inst)
ABI_CallFunctionR(PowerPC::ClearCacheLine, RSCRATCH);
ABI_PopRegistersAndAdjustStack(registersInUse, 0);
if (MSR.DR)
if (emit_fast_path)
{
FixupBranch end = J(true);
SwitchToNearCode();