From 3951d238d92e1c4b2c7db9f553272272ecc7691b Mon Sep 17 00:00:00 2001 From: Sintendo Date: Wed, 5 Jun 2019 23:36:14 +0200 Subject: [PATCH] DSPJitArithmetic: Precompute addi immediate Compute immediate value at compile time. --- Source/Core/Core/DSP/Jit/x64/DSPJitArithmetic.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/Core/Core/DSP/Jit/x64/DSPJitArithmetic.cpp b/Source/Core/Core/DSP/Jit/x64/DSPJitArithmetic.cpp index 8e54bd60aa..46c44617ef 100644 --- a/Source/Core/Core/DSP/Jit/x64/DSPJitArithmetic.cpp +++ b/Source/Core/Core/DSP/Jit/x64/DSPJitArithmetic.cpp @@ -701,9 +701,7 @@ void DSPEmitter::addi(const UDSPInstruction opc) // s64 imm = (s16)dsp_fetch_code(); s16 imm = dsp_imem_read(m_compile_pc + 1); // imm <<= 16; - MOV(16, R(RDX), Imm16(imm)); - MOVSX(64, 16, RDX, R(RDX)); - SHL(64, R(RDX), Imm8(16)); + MOV(64, R(RDX), Imm32(imm << 16)); // s64 res = acc + imm; ADD(64, R(RAX), R(RDX)); // dsp_set_long_acc(areg, res);