From ce52ea35ecd0645b40169c9a2fff3a627f84b207 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Sat, 12 Feb 2022 16:14:05 -0800 Subject: [PATCH] Jit: Replace magic 32 with GPFifo::GATHER_PIPE_SIZE --- Source/Core/Core/HW/GPFifo.h | 5 +---- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 3 ++- Source/Core/Core/PowerPC/JitArm64/Jit.cpp | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/HW/GPFifo.h b/Source/Core/Core/HW/GPFifo.h index 703f2fa1e4..95c100a1eb 100644 --- a/Source/Core/Core/HW/GPFifo.h +++ b/Source/Core/Core/HW/GPFifo.h @@ -9,10 +9,7 @@ class PointerWrap; namespace GPFifo { -enum -{ - GATHER_PIPE_SIZE = 32 -}; +constexpr u32 GATHER_PIPE_SIZE = 32; // Init void Init(); diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index b54c9ca74a..903bc826fb 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -1018,7 +1018,8 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) bool gatherPipeIntCheck = js.fifoWriteAddresses.find(op.address) != js.fifoWriteAddresses.end(); // Gather pipe writes using an immediate address are explicitly tracked. - if (jo.optimizeGatherPipe && (js.fifoBytesSinceCheck >= 32 || js.mustCheckFifo)) + if (jo.optimizeGatherPipe && + (js.fifoBytesSinceCheck >= GPFifo::GATHER_PIPE_SIZE || js.mustCheckFifo)) { js.fifoBytesSinceCheck = 0; js.mustCheckFifo = false; diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp index bdcf40fdfc..113c8e0043 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp @@ -835,7 +835,8 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) // Gather pipe writes using a non-immediate address are discovered by profiling. bool gatherPipeIntCheck = js.fifoWriteAddresses.find(op.address) != js.fifoWriteAddresses.end(); - if (jo.optimizeGatherPipe && (js.fifoBytesSinceCheck >= 32 || js.mustCheckFifo)) + if (jo.optimizeGatherPipe && + (js.fifoBytesSinceCheck >= GPFifo::GATHER_PIPE_SIZE || js.mustCheckFifo)) { js.fifoBytesSinceCheck = 0; js.mustCheckFifo = false;