From 3f633f96bd7504a140d68776a0b8f86e8700f513 Mon Sep 17 00:00:00 2001 From: "j4ck.fr0st" Date: Fri, 18 Jun 2010 14:51:40 +0000 Subject: [PATCH] DSPLLE: some changes i had lying around, get rid of the shifting and make popExtValueToReg do the same as its int counterpart applyWriteBackLog (that is, OR'ing the result of both ops, rather than overwriting the main op result with the ext op result) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5735 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp | 2 +- Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp b/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp index 77db35b253..389310f3a5 100644 --- a/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp +++ b/Source/Core/DSPCore/Src/Jit/DSPJitExtOps.cpp @@ -532,7 +532,7 @@ void DSPEmitter::pushExtValueFromMem(u16 dreg, u16 sreg) { void DSPEmitter::popExtValueToReg() { if (storeIndex != -1) - MOV(16, M(&g_dsp.r[storeIndex]), R(EBX)); + OR(16, M(&g_dsp.r[storeIndex]), R(EBX)); storeIndex = -1; // TODO handle commands such as 'l diff --git a/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp b/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp index 6a5dc5d031..f6bf093128 100644 --- a/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp +++ b/Source/Core/DSPCore/Src/Jit/DSPJitUtil.cpp @@ -267,15 +267,13 @@ void DSPEmitter::ext_dmem_write(u32 dest, u32 src) // g_dsp.dram[addr & DSP_DRAM_MASK] = val; AND(16, R(EAX), Imm16(DSP_DRAM_MASK)); - SHL(16, R(EAX), Imm8(1)); // * sizeof(u16) #ifdef _M_X64 - MOV(64, R(R11), Imm64((u64)g_dsp.dram)); - ADD(64, R(EAX), R(R11)); + MOV(64, R(ESI), M(&g_dsp.dram)); #else - ADD(32, R(EAX), Imm32((u32)g_dsp.dram)); + MOV(32, R(ESI), M(&g_dsp.dram)); #endif - MOV(16, MDisp(EAX,0), R(ECX)); - + MOV(16, MComplex(ESI, EAX, 2, 0), R(ECX)); + FixupBranch end = J(); // else if (saddr == 0xf) SetJumpTarget(ifx); @@ -301,14 +299,12 @@ void DSPEmitter::ext_dmem_read(u16 addr) FixupBranch dram = J_CC(CC_NZ); // return g_dsp.dram[addr & DSP_DRAM_MASK]; AND(16, R(ECX), Imm16(DSP_DRAM_MASK)); - SHL(16, R(ECX), Imm8(1)); // * sizeof(u16) #ifdef _M_X64 - MOV(64, R(R11), Imm64((u64)g_dsp.dram)); - ADD(64, R(ECX), R(R11)); + MOV(64, R(ESI), M(&g_dsp.dram)); #else - ADD(32, R(ECX), Imm32((u32)g_dsp.dram)); + MOV(32, R(ESI), M(&g_dsp.dram)); #endif - MOV(16, R(EAX), MDisp(ECX,0)); + MOV(16, R(EAX), MComplex(ESI, ECX, 2, 0)); FixupBranch end = J(); SetJumpTarget(dram);