From e24e52af3c0dd0be3bc21b0fe1531b2435436688 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Tue, 28 Mar 2023 03:57:56 +0200 Subject: [PATCH] Jit64: Use utility function for function calls in dcbx. We have these for a reason. I think this also fixes a theoretical problem when `ABI_PARAM1 == loop_counter` where the first MOV destroys the second's value; I'm not sure if this can actually happen in practice though. --- Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp index 445a68c0db..c56c4a4764 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp @@ -361,16 +361,13 @@ void Jit64::dcbx(UGeckoInstruction inst) ABI_PushRegistersAndAdjustStack(registersInUse, 0); if (make_loop) { - MOV(32, R(ABI_PARAM2), R(effective_address)); - MOV(32, R(ABI_PARAM3), R(loop_counter)); - MOV(64, R(ABI_PARAM1), Imm64(reinterpret_cast(&m_system.GetJitInterface()))); - ABI_CallFunction(JitInterface::InvalidateICacheLinesFromJIT); + ABI_CallFunctionPRR(JitInterface::InvalidateICacheLinesFromJIT, &m_system.GetJitInterface(), + effective_address, loop_counter); } else { - MOV(32, R(ABI_PARAM2), R(effective_address)); - MOV(64, R(ABI_PARAM1), Imm64(reinterpret_cast(&m_system.GetJitInterface()))); - ABI_CallFunction(JitInterface::InvalidateICacheLineFromJIT); + ABI_CallFunctionPR(JitInterface::InvalidateICacheLineFromJIT, &m_system.GetJitInterface(), + effective_address); } ABI_PopRegistersAndAdjustStack(registersInUse, 0); asm_routines.ResetStack(*this);