JitArm64_RegCache: Add IsImm helper

Because checking if a register is a specific immediate is a rather
common operation.
This commit is contained in:
Sintendo 2024-10-10 22:13:30 +02:00
parent 7db13d23c9
commit 8304ae3361

View File

@ -286,6 +286,8 @@ public:
// Gets the immediate that a register is set to. Only valid for guest GPRs.
u32 GetImm(size_t preg) const { return GetGuestGPROpArg(preg).GetImm(); }
bool IsImm(size_t preg, u32 imm) { return IsImm(preg) && GetImm(preg) == imm; }
// Binds a guest GPR to a host register, optionally loading its value.
//
// preg: The guest register index.