mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
JitRegCache: Convert #define macro into a typed constant
This commit is contained in:
parent
4ae23fc45c
commit
e291e8f1a7
@ -950,7 +950,7 @@ BitSet8 Jit64::ComputeStaticGQRs(const PPCAnalyst::CodeBlock& cb) const
|
|||||||
BitSet32 Jit64::CallerSavedRegistersInUse() const
|
BitSet32 Jit64::CallerSavedRegistersInUse() const
|
||||||
{
|
{
|
||||||
BitSet32 result;
|
BitSet32 result;
|
||||||
for (int i = 0; i < NUMXREGS; i++)
|
for (size_t i = 0; i < RegCache::NUM_XREGS; i++)
|
||||||
{
|
{
|
||||||
if (!gpr.IsFreeX(i))
|
if (!gpr.IsFreeX(i))
|
||||||
result[i] = true;
|
result[i] = true;
|
||||||
|
@ -31,11 +31,11 @@ struct X64CachedReg
|
|||||||
bool locked;
|
bool locked;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUMXREGS 16
|
|
||||||
|
|
||||||
class RegCache
|
class RegCache
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
static constexpr size_t NUM_XREGS = 16;
|
||||||
|
|
||||||
RegCache();
|
RegCache();
|
||||||
virtual ~RegCache() = default;
|
virtual ~RegCache() = default;
|
||||||
|
|
||||||
@ -129,6 +129,6 @@ protected:
|
|||||||
float ScoreRegister(Gen::X64Reg xreg);
|
float ScoreRegister(Gen::X64Reg xreg);
|
||||||
|
|
||||||
std::array<PPCCachedReg, 32> regs;
|
std::array<PPCCachedReg, 32> regs;
|
||||||
std::array<X64CachedReg, NUMXREGS> xregs;
|
std::array<X64CachedReg, NUM_XREGS> xregs;
|
||||||
Gen::XEmitter* emit;
|
Gen::XEmitter* emit;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user