From 6ea3f538b40ee9a378366f0c35c02bddfbfb7f62 Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 18 Nov 2017 17:42:11 +0100 Subject: [PATCH] JitArm64: Inline GP check in Cleanup. We're calling this function up to 2M times per second. Let's inline the pre-check. --- Source/Core/Core/PowerPC/JitArm64/Jit.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp index 4b27c13f00..4452d3d1e4 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp @@ -231,8 +231,13 @@ void JitArm64::Cleanup() { if (jo.optimizeGatherPipe && js.fifoBytesSinceCheck > 0) { - MOVP2R(X0, &GPFifo::FastCheckGatherPipe); + LDP(INDEX_SIGNED, X0, X1, PPC_REG, PPCSTATE_OFF(gather_pipe_ptr)); + SUB(X0, X0, X1); + CMP(X0, GPFifo::GATHER_PIPE_SIZE); + FixupBranch exit = B(CC_LT); + MOVP2R(X0, &GPFifo::UpdateGatherPipe); BLR(X0); + SetJumpTarget(exit); } }