From 256e23494906ceac4d6919be248731e4a8816e17 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 15 Oct 2018 21:01:26 +0100 Subject: [PATCH] Jit_Integer: DoMergedBranchCondition --- Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp index f6756b23e6..717646e9e5 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_Integer.cpp @@ -448,8 +448,8 @@ void Jit64::DoMergedBranchCondition() bool condition = !!(next.BO & BO_BRANCH_IF_TRUE); const u32 nextPC = js.op[1].address; - gpr.UnlockAll(); - gpr.UnlockAllX(); + ASSERT(gpr.IsAllUnlocked()); + FixupBranch pDontBranch; if (test_bit & 8) pDontBranch = J_CC(condition ? CC_GE : CC_L, true); // Test < 0, so jump over if >= 0. @@ -460,10 +460,15 @@ void Jit64::DoMergedBranchCondition() else // SO bit, do not branch (we don't emulate SO for cmp). pDontBranch = J(true); - gpr.Flush(RegCache::FlushMode::MaintainState); - fpr.Flush(RegCache::FlushMode::MaintainState); + { + RCForkGuard gpr_guard = gpr.Fork(); + RCForkGuard fpr_guard = fpr.Fork(); - DoMergedBranch(); + gpr.Flush(); + fpr.Flush(); + + DoMergedBranch(); + } SetJumpTarget(pDontBranch);