Merge pull request #12980 from mitaclaw/is-debugging-enabled-getter

JITs: Consistently Use Trivial `IsDebuggingEnabled` Getter
This commit is contained in:
Tilka 2024-08-07 15:07:42 +01:00 committed by GitHub
commit 8b1046595b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -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(); 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 // We can link blocks as long as we are not single stepping
EnableBlockLink(); EnableBlockLink();
@ -1035,7 +1035,7 @@ bool Jit64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
{ {
auto& cpu = m_system.GetCPU(); auto& cpu = m_system.GetCPU();
auto& power_pc = m_system.GetPowerPC(); 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()) !cpu.IsStepping())
{ {
gpr.Flush(); gpr.Flush();

View File

@ -943,7 +943,7 @@ void JitArm64::Jit(u32 em_address, bool clear_cache_and_retry_on_failure)
auto& cpu = m_system.GetCPU(); auto& cpu = m_system.GetCPU();
if (m_enable_debugging) if (IsDebuggingEnabled())
{ {
// We can link blocks as long as we are not single stepping // We can link blocks as long as we are not single stepping
SetBlockLinkingEnabled(true); SetBlockLinkingEnabled(true);
@ -1237,7 +1237,7 @@ bool JitArm64::DoJit(u32 em_address, JitBlock* b, u32 nextPC)
} }
else else
{ {
if (m_enable_debugging && !cpu.IsStepping() && if (IsDebuggingEnabled() && !cpu.IsStepping() &&
m_system.GetPowerPC().GetBreakPoints().IsAddressBreakPoint(op.address)) m_system.GetPowerPC().GetBreakPoints().IsAddressBreakPoint(op.address))
{ {
FlushCarry(); FlushCarry();

View File

@ -151,7 +151,7 @@ void JitBase::InitFastmemArena()
void JitBase::InitBLROptimization() void JitBase::InitBLROptimization()
{ {
m_enable_blr_optimization = m_enable_blr_optimization =
jo.enableBlocklink && !m_enable_debugging && EMM::IsExceptionHandlerSupported(); jo.enableBlocklink && !IsDebuggingEnabled() && EMM::IsExceptionHandlerSupported();
m_cleanup_after_stackfault = false; m_cleanup_after_stackfault = false;
} }
@ -267,7 +267,7 @@ bool JitBase::CanMergeNextInstructions(int count) const
// Be careful: a breakpoint kills flags in between instructions // Be careful: a breakpoint kills flags in between instructions
for (int i = 1; i <= count; i++) for (int i = 1; i <= count; i++)
{ {
if (m_enable_debugging && if (IsDebuggingEnabled() &&
m_system.GetPowerPC().GetBreakPoints().IsAddressBreakPoint(js.op[i].address)) m_system.GetPowerPC().GetBreakPoints().IsAddressBreakPoint(js.op[i].address))
{ {
return false; return false;