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 result;
|
||||
for (int i = 0; i < NUMXREGS; i++)
|
||||
for (size_t i = 0; i < RegCache::NUM_XREGS; i++)
|
||||
{
|
||||
if (!gpr.IsFreeX(i))
|
||||
result[i] = true;
|
||||
|
|
|
@ -31,11 +31,11 @@ struct X64CachedReg
|
|||
bool locked;
|
||||
};
|
||||
|
||||
#define NUMXREGS 16
|
||||
|
||||
class RegCache
|
||||
{
|
||||
public:
|
||||
static constexpr size_t NUM_XREGS = 16;
|
||||
|
||||
RegCache();
|
||||
virtual ~RegCache() = default;
|
||||
|
||||
|
@ -129,6 +129,6 @@ protected:
|
|||
float ScoreRegister(Gen::X64Reg xreg);
|
||||
|
||||
std::array<PPCCachedReg, 32> regs;
|
||||
std::array<X64CachedReg, NUMXREGS> xregs;
|
||||
std::array<X64CachedReg, NUM_XREGS> xregs;
|
||||
Gen::XEmitter* emit;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue