From e0e0c074ef782aa4fac8b54a0c5dea16f69b0ae4 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Wed, 7 Aug 2024 04:44:45 -0700 Subject: [PATCH] JITs: Consistently Use Trivial `IsDebuggingEnabled` Getter --- Source/Core/Core/PowerPC/Jit64/Jit.cpp | 4 ++-- Source/Core/Core/PowerPC/JitArm64/Jit.cpp | 4 ++-- Source/Core/Core/PowerPC/JitCommon/JitBase.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index 98d6dbb281..fe46aa90a6 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -757,7 +757,7 @@ void Jit64::Jit(u32 em_address, bool clear_cache_and_retry_on_failure) std::size_t block_size = m_code_buffer.size(); - if (m_enable_debugging) + if (IsDebuggingEnabled()) { // We can link blocks as long as we are not single stepping EnableBlockLink(); @@ -1035,7 +1035,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) { auto& cpu = m_system.GetCPU(); auto& power_pc = m_system.GetPowerPC(); - if (m_enable_debugging && power_pc.GetBreakPoints().IsAddressBreakPoint(op.address) && + if (IsDebuggingEnabled() && power_pc.GetBreakPoints().IsAddressBreakPoint(op.address) && !cpu.IsStepping()) { gpr.Flush(); diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp index c005484377..4f0bd71c31 100644 --- a/Source/Core/Core/PowerPC/JitArm64/Jit.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/Jit.cpp @@ -943,7 +943,7 @@ void JitArm64::Jit(u32 em_address, bool clear_cache_and_retry_on_failure) auto& cpu = m_system.GetCPU(); - if (m_enable_debugging) + if (IsDebuggingEnabled()) { // We can link blocks as long as we are not single stepping SetBlockLinkingEnabled(true); @@ -1237,7 +1237,7 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC) } else { - if (m_enable_debugging && !cpu.IsStepping() && + if (IsDebuggingEnabled() && !cpu.IsStepping() && m_system.GetPowerPC().GetBreakPoints().IsAddressBreakPoint(op.address)) { FlushCarry(); diff --git a/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp b/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp index 372a06008c..39b173095c 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitBase.cpp @@ -151,7 +151,7 @@ void JitBase::InitFastmemArena() void JitBase::InitBLROptimization() { m_enable_blr_optimization = - jo.enableBlocklink && !m_enable_debugging && EMM::IsExceptionHandlerSupported(); + jo.enableBlocklink && !IsDebuggingEnabled() && EMM::IsExceptionHandlerSupported(); m_cleanup_after_stackfault = false; } @@ -267,7 +267,7 @@ bool JitBase::CanMergeNextInstructions(int count) const // Be careful: a breakpoint kills flags in between instructions for (int i = 1; i <= count; i++) { - if (m_enable_debugging && + if (IsDebuggingEnabled() && m_system.GetPowerPC().GetBreakPoints().IsAddressBreakPoint(js.op[i].address)) { return false;