diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Integer.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Integer.cpp index 75fc860429..1c7c42574c 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Integer.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_Integer.cpp @@ -479,6 +479,7 @@ void divwx(UGeckoInstruction _inst) { if (_inst.OE) PanicAlert("OE: divwx"); + // should set OV //else PanicAlert("Div by zero", "divwx"); } else @@ -497,6 +498,7 @@ void divwux(UGeckoInstruction _inst) { if (_inst.OE) PanicAlert("OE: divwux"); + // should set OV //else PanicAlert("Div by zero", "divwux"); } else diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp index bd48e0df1d..a84ec60c48 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp @@ -572,8 +572,12 @@ void Jit64::divwux(UGeckoInstruction inst) MOV(32, R(EAX), gpr.R(a)); XOR(32, R(EDX), R(EDX)); gpr.KillImmediate(b); + CMP(32, gpr.R(b), R(EDX)); + // doesn't handle if OE is set, but int doesn't either... + FixupBranch branch = J_CC(CC_Z); DIV(32, gpr.R(b)); MOV(32, gpr.R(d), R(EAX)); + SetJumpTarget(branch); gpr.UnlockAll(); gpr.UnlockAllX(); if (inst.Rc) {