JitArm64_RegCache: Mark HostReg operator== as const

Also provides operator!= for logical symmetry.

We can also take the arguments by value, as the arguments are trivially
copyable enum values which fit nicely into registers already.
This commit is contained in:
Lioncash 2020-12-30 09:42:26 -05:00
parent e7538b10c6
commit e2bb9fd147
1 changed files with 3 additions and 1 deletions

View File

@ -110,7 +110,9 @@ public:
void Lock() { m_locked = true; }
void Unlock() { m_locked = false; }
Arm64Gen::ARM64Reg GetReg() const { return m_reg; }
bool operator==(const Arm64Gen::ARM64Reg& reg) { return reg == m_reg; }
bool operator==(Arm64Gen::ARM64Reg reg) const { return reg == m_reg; }
bool operator!=(Arm64Gen::ARM64Reg reg) const { return !operator==(reg); }
private:
Arm64Gen::ARM64Reg m_reg = Arm64Gen::INVALID_REG;