Skip to content

Commit

Permalink
Jit: Remove unnecessary member variables
Browse files Browse the repository at this point in the history
  • Loading branch information
JosJuice committed Jan 1, 2023
1 parent 13d5ad4 commit e5f47c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/PowerPC/JitArm64/Jit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void JitArm64::Init()
{
RefreshConfig();

const size_t child_code_size = m_mmu_enabled ? FARCODE_SIZE_MMU : FARCODE_SIZE;
const size_t child_code_size = jo.memcheck ? FARCODE_SIZE_MMU : FARCODE_SIZE;
AllocCodeSpace(CODE_SIZE + child_code_size);
AddChildCodeSpace(&m_far_code, child_code_size);

Expand Down
6 changes: 2 additions & 4 deletions Source/Core/Core/PowerPC/JitCommon/JitBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,15 @@ void JitBase::RefreshConfig()
for (auto [member, config_info] : JIT_SETTINGS)
this->*member = Config::Get(*config_info);

m_mmu_enabled = Core::System::GetInstance().IsMMUMode();
m_pause_on_panic_enabled = Core::System::GetInstance().IsPauseOnPanicMode();

analyzer.SetDebuggingEnabled(m_enable_debugging);
analyzer.SetBranchFollowingEnabled(m_enable_branch_following);
analyzer.SetFloatExceptionsEnabled(m_enable_float_exceptions);
analyzer.SetDivByZeroExceptionsEnabled(m_enable_div_by_zero_exceptions);

bool any_watchpoints = PowerPC::memchecks.HasAny();
jo.fastmem = m_fastmem_enabled && jo.fastmem_arena && (MSR.DR || !any_watchpoints);
jo.memcheck = m_mmu_enabled || m_pause_on_panic_enabled || any_watchpoints;
jo.memcheck = Core::System::GetInstance().IsMMUMode() ||
Core::System::GetInstance().IsPauseOnPanicMode() || any_watchpoints;
jo.fp_exceptions = m_enable_float_exceptions;
jo.div_by_zero_exceptions = m_enable_div_by_zero_exceptions;
}
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Core/PowerPC/JitCommon/JitBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ class JitBase : public CPUCoreBase
bool m_fprf = false;
bool m_accurate_nans = false;
bool m_fastmem_enabled = false;
bool m_mmu_enabled = false;
bool m_pause_on_panic_enabled = false;

static const std::array<std::pair<bool JitBase::*, const Config::Info<bool>*>, 21> JIT_SETTINGS;

Expand Down

0 comments on commit e5f47c2

Please sign in to comment.