mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
JitRegCache: Add RegistersInUse
This commit is contained in:
parent
096392f295
commit
08c41090b2
@ -967,15 +967,8 @@ BitSet8 Jit64::ComputeStaticGQRs(const PPCAnalyst::CodeBlock& cb) const
|
||||
|
||||
BitSet32 Jit64::CallerSavedRegistersInUse() const
|
||||
{
|
||||
BitSet32 result;
|
||||
for (size_t i = 0; i < NUM_XREGS; i++)
|
||||
{
|
||||
if (!gpr.IsFreeX(i))
|
||||
result[i] = true;
|
||||
if (!fpr.IsFreeX(i))
|
||||
result[16 + i] = true;
|
||||
}
|
||||
return result & ABI_ALL_CALLER_SAVED;
|
||||
BitSet32 in_use = gpr.RegistersInUse() | (fpr.RegistersInUse() << 16);
|
||||
return in_use & ABI_ALL_CALLER_SAVED;
|
||||
}
|
||||
|
||||
void Jit64::EnableBlockLink()
|
||||
|
@ -677,6 +677,17 @@ void RegCache::PreloadRegisters(BitSet32 to_preload)
|
||||
}
|
||||
}
|
||||
|
||||
BitSet32 RegCache::RegistersInUse() const
|
||||
{
|
||||
BitSet32 result;
|
||||
for (size_t i = 0; i < m_xregs.size(); i++)
|
||||
{
|
||||
if (!m_xregs[i].IsFree())
|
||||
result[i] = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
void RegCache::NewLock(preg_t preg)
|
||||
{
|
||||
m_regs[preg].Lock();
|
||||
|
@ -247,6 +247,7 @@ public:
|
||||
bool IsAllUnlocked() const;
|
||||
|
||||
void PreloadRegisters(BitSet32 regs);
|
||||
BitSet32 RegistersInUse() const;
|
||||
|
||||
protected:
|
||||
friend class RCOpArg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user