DSP Jit more minor fixes

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5405 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2010-04-25 14:24:55 +00:00
parent 8d5c9f30ad
commit 64447eab2c
4 changed files with 17 additions and 6 deletions

View File

@ -125,7 +125,7 @@ u16 gdsp_mbox_read_l(u8 mbx)
}
void gdsp_ifx_write(u16 addr, u16 val)
void gdsp_ifx_write(u32 addr, u32 val)
{
switch (addr & 0xff)
{

View File

@ -39,7 +39,7 @@ u16 gdsp_mbox_read_l(u8 mbx);
void gdsp_ifx_init();
void gdsp_ifx_write(u16 addr, u16 val);
void gdsp_ifx_write(u32 addr, u32 val);
u16 gdsp_ifx_read(u16 addr);
void gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size);

View File

@ -256,15 +256,16 @@ void DSPEmitter::ext_dmem_write(u32 dest, u32 src)
MOVZX(32, 16, ECX, M(&g_dsp.r[src]));
// u16 saddr = addr >> 12;
MOVZX(32, 16, ESI, R(EAX));
MOV(32, R(ESI), R(EAX));
SHR(16, R(ESI), Imm8(12));
// if (saddr == 0)
CMP(16, R(ESI), Imm16(0));
TEST(16, R(ESI), R(ESI));
FixupBranch ifx = J_CC(CC_NZ);
// g_dsp.dram[addr & DSP_DRAM_MASK] = val;
AND(16, R(EAX), Imm16(DSP_DRAM_MASK));
SHL(16, R(EAX), Imm16(1)); // * sizeof(u16)
#ifdef _M_X64
MOV(64, R(R11), Imm64((u64)g_dsp.dram));
ADD(64, R(EAX), R(R11));
@ -287,14 +288,15 @@ void DSPEmitter::ext_dmem_read(u16 addr)
MOVZX(32, 16, ECX, M(&addr));
// u16 saddr = addr >> 12;
MOVZX(32, 16, ESI, R(ECX));
MOV(32, R(ESI), R(ECX));
SHR(16, R(ESI), Imm8(12));
// if (saddr == 0)
CMP(16, R(ESI), Imm16(0));
TEST(16, R(ESI), R(ESI));
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), Imm16(1)); // * sizeof(u16)
#ifdef _M_X64
MOV(64, R(R11), Imm64((u64)g_dsp.dram));
ADD(64, R(ECX), R(R11));

View File

@ -77,6 +77,14 @@ void sbset()
tester.Report();
}
void nx_s()
{
DSPJitTester tester(0x8000, 0x0020);
tester.AddTestData(DSP_REG_AR0);
tester.AddTestData(DSP_REG_ACL0);
tester.TestAll(true);
tester.Report();
}
void AudioJitTests()
{
DSPJitTester::Initialize();
@ -91,6 +99,7 @@ void AudioJitTests()
nx_ir();
nx_dr();
nx_nr();
nx_s();
}
//required to be able to link against DSPCore