From 4a2efc8f5e06de966e08cb7c69a97fe1e97bca2d Mon Sep 17 00:00:00 2001 From: MerryMage Date: Mon, 15 Oct 2018 21:01:35 +0100 Subject: [PATCH] Jit_LoadStore: dcbz --- Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp index 0710809506..ee09ba4923 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp @@ -330,10 +330,14 @@ void Jit64::dcbz(UGeckoInstruction inst) int a = inst.RA; int b = inst.RB; - MOV(32, R(RSCRATCH), gpr.R(b)); - if (a) - ADD(32, R(RSCRATCH), gpr.R(a)); - AND(32, R(RSCRATCH), Imm32(~31)); + { + RCOpArg Ra = a ? gpr.Use(a, RCMode::Read) : RCOpArg::Imm32(0); + RCOpArg Rb = gpr.Use(b, RCMode::Read); + RegCache::Realize(Ra, Rb); + + MOV_sum(32, RSCRATCH, Ra, Rb); + AND(32, R(RSCRATCH), Imm32(~31)); + } if (MSR.DR) {