JitRegCache: Remove FlushR

No external users.
This commit is contained in:
MerryMage 2018-09-30 14:11:44 +01:00
parent ba33e1e69b
commit 66c3d1e183
2 changed files with 15 additions and 22 deletions

View File

@ -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

View File

@ -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;