From 2ac7b5a523383d2125db1f8d6dc844425c4148e6 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Wed, 5 Apr 2023 20:00:37 +0200 Subject: [PATCH] Jit64: Fix possibly redundant MOV in ABI_CallFunctionPR(). --- Source/Core/Common/x64Emitter.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/x64Emitter.h b/Source/Core/Common/x64Emitter.h index 6bf034b455..3eac996130 100644 --- a/Source/Core/Common/x64Emitter.h +++ b/Source/Core/Common/x64Emitter.h @@ -1106,7 +1106,8 @@ public: template void ABI_CallFunctionPR(FunctionPointer func, const void* ptr, X64Reg reg1) { - MOV(64, R(ABI_PARAM2), R(reg1)); + if (reg1 != ABI_PARAM2) + MOV(64, R(ABI_PARAM2), R(reg1)); MOV(64, R(ABI_PARAM1), Imm64(reinterpret_cast(ptr))); ABI_CallFunction(func); }