From d26709f713c5c4a83675dd3e5cb3fe206c27a0e7 Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 3 Nov 2016 20:15:53 +0100 Subject: [PATCH] Jit64: Use ImmPtr for mtcrf. Only a small overhead, but PIE compatible. --- Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp index be1a9903cc..abc93dbca4 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp @@ -483,6 +483,7 @@ void Jit64::mtcrf(UGeckoInstruction inst) } else { + MOV(64, R(RSCRATCH2), ImmPtr(m_crTable)); gpr.Lock(inst.RS); gpr.BindToRegister(inst.RS, true, false); for (int i = 0; i < 8; i++) @@ -494,7 +495,7 @@ void Jit64::mtcrf(UGeckoInstruction inst) SHR(32, R(RSCRATCH), Imm8(28 - (i * 4))); if (i != 0) AND(32, R(RSCRATCH), Imm8(0xF)); - MOV(64, R(RSCRATCH), MScaled(RSCRATCH, SCALE_8, (u32)(u64)m_crTable)); + MOV(64, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_8, 0)); MOV(64, PPCSTATE(cr_val[i]), R(RSCRATCH)); } }