diff --git a/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp b/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp index 6bd8784615..a7d034ce8a 100644 --- a/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp +++ b/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp @@ -78,32 +78,16 @@ void RegCache::Flush(FlushMode mode, BitSet32 regsToFlush) } } -void RegCache::FlushR(X64Reg reg) -{ - ASSERT_MSG(DYNA_REC, reg < m_xregs.size(), "Flushing non-existent reg %i", reg); - ASSERT(!m_xregs[reg].IsLocked()); - if (!m_xregs[reg].IsFree()) - { - StoreFromRegister(m_xregs[reg].Contents()); - } -} - -void RegCache::FlushR(X64Reg reg, X64Reg reg2) -{ - FlushR(reg); - FlushR(reg2); -} - void RegCache::FlushLockX(X64Reg reg) { - FlushR(reg); + FlushX(reg); LockX(reg); } void RegCache::FlushLockX(X64Reg reg1, X64Reg reg2) { - FlushR(reg1); - FlushR(reg2); + FlushX(reg1); + FlushX(reg2); LockX(reg1); LockX(reg2); } @@ -293,6 +277,16 @@ int RegCache::NumFreeRegisters() const return count; } +void RegCache::FlushX(X64Reg reg) +{ + ASSERT_MSG(DYNA_REC, reg < m_xregs.size(), "Flushing non-existent reg %i", reg); + ASSERT(!m_xregs[reg].IsLocked()); + if (!m_xregs[reg].IsFree()) + { + StoreFromRegister(m_xregs[reg].Contents()); + } +} + // Estimate roughly how bad it would be to de-allocate this register. Higher score // means more bad. float RegCache::ScoreRegister(X64Reg xreg) const diff --git a/Source/Core/Core/PowerPC/Jit64/JitRegCache.h b/Source/Core/Core/PowerPC/Jit64/JitRegCache.h index 007ff66cd8..e32e42ae47 100644 --- a/Source/Core/Core/PowerPC/Jit64/JitRegCache.h +++ b/Source/Core/Core/PowerPC/Jit64/JitRegCache.h @@ -144,9 +144,6 @@ public: void Flush(FlushMode mode = FlushMode::All, BitSet32 regsToFlush = BitSet32::AllTrue(32)); - void FlushR(Gen::X64Reg reg); - void FlushR(Gen::X64Reg reg, Gen::X64Reg reg2); - void FlushLockX(Gen::X64Reg reg); void FlushLockX(Gen::X64Reg reg1, Gen::X64Reg reg2); @@ -219,6 +216,8 @@ protected: virtual BitSet32 GetRegUtilization() const = 0; virtual BitSet32 CountRegsIn(size_t preg, u32 lookahead) const = 0; + void FlushX(Gen::X64Reg reg); + float ScoreRegister(Gen::X64Reg xreg) const; Jit64& m_jit;