From 00d65f7a694c982cfde94d37f9b7e2a6b603caa5 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 15 Oct 2018 21:01:31 +0100 Subject: [PATCH] Jit: memcheck --- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index b8a60e97eb..a4f31181b0 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -917,6 +917,12 @@ u8* Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) m_exception_handler_at_loc[js.fastmemLoadStore] = GetWritableCodePtr(); } + RCForkGuard gpr_guard = gpr.Fork(); + RCForkGuard fpr_guard = fpr.Fork(); + + gpr.Revert(); + fpr.Revert(); + BitSet32 gprToFlush = BitSet32::AllTrue(32); BitSet32 fprToFlush = BitSet32::AllTrue(32); if (js.revertGprLoad >= 0) @@ -930,6 +936,9 @@ u8* Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) SwitchToNearCode(); } + gpr.Commit(); + fpr.Commit(); + // If we have a register that will never be used again, flush it. for (int j : ~op.gprInUse) gpr.StoreFromRegister(j);