From 8304ae33613c197ae377ed246d705f0b2a398e38 Mon Sep 17 00:00:00 2001 From: Sintendo <3380580+Sintendo@users.noreply.github.com> Date: Thu, 10 Oct 2024 22:13:30 +0200 Subject: [PATCH] JitArm64_RegCache: Add IsImm helper Because checking if a register is a specific immediate is a rather common operation. --- Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h b/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h index 9ea4e0e3b6..bfc9f32a54 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_RegCache.h @@ -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.