Merge pull request #11729 from AdmiralCurtiss/redundant-mov
Jit64: Fix possibly redundant MOV in ABI_CallFunctionPR().
This commit is contained in:
commit
74da38916e
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue