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
This commit is contained in:
j4ck.fr0st 2010-06-18 14:51:40 +00:00
parent ca1a5e9228
commit 3f633f96bd
2 changed files with 8 additions and 12 deletions
Source/Core/DSPCore/Src/Jit

View File

@ -532,7 +532,7 @@ void DSPEmitter::pushExtValueFromMem(u16 dreg, u16 sreg) {
void DSPEmitter::popExtValueToReg() { void DSPEmitter::popExtValueToReg() {
if (storeIndex != -1) if (storeIndex != -1)
MOV(16, M(&g_dsp.r[storeIndex]), R(EBX)); OR(16, M(&g_dsp.r[storeIndex]), R(EBX));
storeIndex = -1; storeIndex = -1;
// TODO handle commands such as 'l // TODO handle commands such as 'l

View File

@ -267,15 +267,13 @@ void DSPEmitter::ext_dmem_write(u32 dest, u32 src)
// g_dsp.dram[addr & DSP_DRAM_MASK] = val; // g_dsp.dram[addr & DSP_DRAM_MASK] = val;
AND(16, R(EAX), Imm16(DSP_DRAM_MASK)); AND(16, R(EAX), Imm16(DSP_DRAM_MASK));
SHL(16, R(EAX), Imm8(1)); // * sizeof(u16)
#ifdef _M_X64 #ifdef _M_X64
MOV(64, R(R11), Imm64((u64)g_dsp.dram)); MOV(64, R(ESI), M(&g_dsp.dram));
ADD(64, R(EAX), R(R11));
#else #else
ADD(32, R(EAX), Imm32((u32)g_dsp.dram)); MOV(32, R(ESI), M(&g_dsp.dram));
#endif #endif
MOV(16, MDisp(EAX,0), R(ECX)); MOV(16, MComplex(ESI, EAX, 2, 0), R(ECX));
FixupBranch end = J(); FixupBranch end = J();
// else if (saddr == 0xf) // else if (saddr == 0xf)
SetJumpTarget(ifx); SetJumpTarget(ifx);
@ -301,14 +299,12 @@ void DSPEmitter::ext_dmem_read(u16 addr)
FixupBranch dram = J_CC(CC_NZ); FixupBranch dram = J_CC(CC_NZ);
// return g_dsp.dram[addr & DSP_DRAM_MASK]; // return g_dsp.dram[addr & DSP_DRAM_MASK];
AND(16, R(ECX), Imm16(DSP_DRAM_MASK)); AND(16, R(ECX), Imm16(DSP_DRAM_MASK));
SHL(16, R(ECX), Imm8(1)); // * sizeof(u16)
#ifdef _M_X64 #ifdef _M_X64
MOV(64, R(R11), Imm64((u64)g_dsp.dram)); MOV(64, R(ESI), M(&g_dsp.dram));
ADD(64, R(ECX), R(R11));
#else #else
ADD(32, R(ECX), Imm32((u32)g_dsp.dram)); MOV(32, R(ESI), M(&g_dsp.dram));
#endif #endif
MOV(16, R(EAX), MDisp(ECX,0)); MOV(16, R(EAX), MComplex(ESI, ECX, 2, 0));
FixupBranch end = J(); FixupBranch end = J();
SetJumpTarget(dram); SetJumpTarget(dram);