From 2661bc151a75588a6231b080995139a03f29d514 Mon Sep 17 00:00:00 2001 From: Fiora Date: Sat, 6 Sep 2014 12:15:34 -0700 Subject: [PATCH] JIT memcheck: don't flush register state unless an exception occurs --- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 7412489948..5c5d9f0558 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -586,12 +586,12 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc if (js.memcheck && (opinfo->flags & FL_LOADSTORE)) { // In case we are about to jump to the dispatcher, flush regs - gpr.Flush(); - fpr.Flush(); - TEST(32, PPCSTATE(Exceptions), Imm32(EXCEPTION_DSI)); FixupBranch noMemException = J_CC(CC_Z, true); + gpr.Flush(FLUSH_MAINTAIN_STATE); + fpr.Flush(FLUSH_MAINTAIN_STATE); + // If a memory exception occurs, the exception handler will read // from PC. Update PC with the latest value in case that happens. MOV(32, PPCSTATE(pc), Imm32(ops[i].address));