Merge pull request #11729 from AdmiralCurtiss/redundant-mov

Jit64: Fix possibly redundant MOV in ABI_CallFunctionPR().
This commit is contained in:
Mai 2023-04-06 21:42:28 -04:00 committed by GitHub
commit 74da38916e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1106,6 +1106,7 @@ public:
template <typename FunctionPointer> template <typename FunctionPointer>
void ABI_CallFunctionPR(FunctionPointer func, const void* ptr, X64Reg reg1) void ABI_CallFunctionPR(FunctionPointer func, const void* ptr, X64Reg reg1)
{ {
if (reg1 != ABI_PARAM2)
MOV(64, R(ABI_PARAM2), R(reg1)); MOV(64, R(ABI_PARAM2), R(reg1));
MOV(64, R(ABI_PARAM1), Imm64(reinterpret_cast<u64>(ptr))); MOV(64, R(ABI_PARAM1), Imm64(reinterpret_cast<u64>(ptr)));
ABI_CallFunction(func); ABI_CallFunction(func);