diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp index 4ada0b3c3c..3feaa7b0d9 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp @@ -421,6 +421,13 @@ void Interpreter::dcbz(UGeckoInstruction inst) return; const u32 dcbz_addr = Helper_Get_EA_X(inst); + + if (!HID0.DCE) + { + GenerateAlignmentException(dcbz_addr); + return; + } + // Hack to stop dcbz/dcbi over low MEM1 trashing memory. if (SConfig::GetInstance().bLowDCBZHack && (dcbz_addr < 0x80008000) && (dcbz_addr >= 0x80000000)) return; @@ -429,6 +436,20 @@ void Interpreter::dcbz(UGeckoInstruction inst) PowerPC::ClearCacheLine(dcbz_addr & (~31)); } +void Interpreter::dcbz_l(UGeckoInstruction inst) +{ + const u32 address = Helper_Get_EA_X(inst); + + if (!HID0.DCE) + { + GenerateAlignmentException(address); + return; + } + + // FAKE: clear memory instead of clearing the cache block + PowerPC::ClearCacheLine(address & (~31)); +} + // eciwx/ecowx technically should access the specified device // We just do it instantly from ppc...and hey, it works! :D void Interpreter::eciwx(UGeckoInstruction inst) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Paired.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Paired.cpp index 6edc5f4c1d..38df41895a 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_Paired.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_Paired.cpp @@ -331,12 +331,3 @@ void Interpreter::ps_cmpo1(UGeckoInstruction inst) { Helper_FloatCompareOrdered(inst, rPS1(inst.FA), rPS1(inst.FB)); } - -// __________________________________________________________________________________________________ -// dcbz_l -// TODO(ector) check docs -void Interpreter::dcbz_l(UGeckoInstruction inst) -{ - // FAKE: clear memory instead of clearing the cache block - PowerPC::ClearCacheLine(Helper_Get_EA_X(inst) & (~31)); -}