Permalink
Browse files

JitRegCache: Remove FlushR

No external users.
  • Loading branch information...
MerryMage committed Sep 30, 2018
1 parent ba33e1e commit 66c3d1e183c677845cd44db6fe9a2147f58acfd1
Showing with 15 additions and 22 deletions.
  1. +13 −19 Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp
  2. +2 −3 Source/Core/Core/PowerPC/Jit64/JitRegCache.h
@@ -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
@@ -144,9 +144,6 @@ class RegCache
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 @@ class RegCache
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;

0 comments on commit 66c3d1e

Please sign in to comment.