mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
JitRegCache: Remove FlushR
No external users.
This commit is contained in:
parent
ba33e1e69b
commit
66c3d1e183
@ -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 @@ 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;
|
||||
|
Loading…
Reference in New Issue
Block a user