From a013638dcb9db5046443f4050117ffe7cbb1de4f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 1 Apr 2018 22:58:35 -0400 Subject: [PATCH] Interpreter_LoadStore: Properly update the DAR whenever an alignment exception occurs within eciwx and ecowx These should be updating the DAR when an alignment exception occurs, just like every other instruction that can cause an alignment exception. --- .../PowerPC/Interpreter/Interpreter_LoadStore.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp index 4260339a1c..d090142287 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_LoadStore.cpp @@ -433,8 +433,12 @@ void Interpreter::eciwx(UGeckoInstruction inst) { PowerPC::ppcState.Exceptions |= EXCEPTION_DSI; } + if (EA & 3) - PowerPC::ppcState.Exceptions |= EXCEPTION_ALIGNMENT; + { + GenerateAlignmentException(EA); + return; + } rGPR[inst.RD] = PowerPC::Read_U32(EA); } @@ -447,8 +451,12 @@ void Interpreter::ecowx(UGeckoInstruction inst) { PowerPC::ppcState.Exceptions |= EXCEPTION_DSI; } + if (EA & 3) - PowerPC::ppcState.Exceptions |= EXCEPTION_ALIGNMENT; + { + GenerateAlignmentException(EA); + return; + } PowerPC::Write_U32(rGPR[inst.RS], EA); }