diff options
| author | pierre <pierre@pirsoft.de> | 2010-11-07 23:15:31 +0000 |
|---|---|---|
| committer | pierre <pierre@pirsoft.de> | 2010-11-07 23:15:31 +0000 |
| commit | 874dab37f893ccd6d22b6dcc750e665405c0b755 (patch) | |
| tree | 0497fbbcf2bf4003e90ad08d00a14b3a9c9e0b47 /Source/UnitTests/DSPJitTester.cpp | |
| parent | e96943c1211235dff56d94606ee779ed2a3dfa73 (diff) | |
Core/DSPCore: Make Jit read from coefficient ROM when told to do so,
change the unit test to catch this bug if it turns up again and two more
zeroWriteBackLog() calls.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6356 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/UnitTests/DSPJitTester.cpp')
| -rw-r--r-- | Source/UnitTests/DSPJitTester.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/UnitTests/DSPJitTester.cpp b/Source/UnitTests/DSPJitTester.cpp index c0b95ca35e..0eaed4e0ea 100644 --- a/Source/UnitTests/DSPJitTester.cpp +++ b/Source/UnitTests/DSPJitTester.cpp @@ -168,10 +168,13 @@ int DSPJitTester::TestAll(bool verbose_fail) dsp.dram = (u16*)AllocateMemoryPages(DSP_DRAM_BYTE_SIZE); dsp.coef = (u16*)AllocateMemoryPages(DSP_COEF_BYTE_SIZE); - // Fill roms with zeros. - memset(dsp.irom, 0, DSP_IROM_BYTE_SIZE); - memset(dsp.coef, 0, DSP_COEF_BYTE_SIZE); - memset(dsp.dram, 0, DSP_DRAM_BYTE_SIZE); + // Fill roms with distinct patterns. + for (int i = 0; i < DSP_IROM_SIZE; i++) + dsp.irom[i] = (i & 0x3fff) | 0x4000; + for (int i = 0; i < DSP_COEF_SIZE; i++) + dsp.coef[i] = (i & 0x3fff) | 0x8000; + for (int i = 0; i < DSP_DRAM_SIZE; i++) + dsp.dram[i] = (i & 0x3fff) | 0xc000; // Fill IRAM with HALT opcodes. for (int i = 0; i < DSP_IRAM_SIZE; i++) dsp.iram[i] = 0x0021; // HALT opcode |
