Debugger: Negative PC-relative loads now properly subtract the offset

This commit is contained in:
Jeffrey Pfau 2014-12-20 15:10:54 -08:00
parent 19bddf993d
commit 58e14082f9
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ Bugfixes:
- ARM7: Fix LDM writeback to a register already written - ARM7: Fix LDM writeback to a register already written
- GBA Memory: Don't call into GPIO write calls if GPIO devices are absent - GBA Memory: Don't call into GPIO write calls if GPIO devices are absent
- GBA BIOS: Fix BIOS prefetch after returning from a SWI - GBA BIOS: Fix BIOS prefetch after returning from a SWI
- Debugger: Negative PC-relative loads now properly subtract the offset
Misc: Misc:
- Qt: Disable sync to video by default - Qt: Disable sync to video by default
- GBA: Exit cleanly on FATAL if the port supports it - GBA: Exit cleanly on FATAL if the port supports it

View File

@ -127,7 +127,7 @@ static int _decodeMemory(struct ARMMemoryAccess memory, int pc, char* buffer, in
int written; int written;
if (memory.format & ARM_MEMORY_REGISTER_BASE) { if (memory.format & ARM_MEMORY_REGISTER_BASE) {
if (memory.baseReg == ARM_PC && memory.format & ARM_MEMORY_IMMEDIATE_OFFSET) { if (memory.baseReg == ARM_PC && memory.format & ARM_MEMORY_IMMEDIATE_OFFSET) {
written = _decodePCRelative(memory.offset.immediate, pc, buffer, blen); written = _decodePCRelative(memory.format & ARM_MEMORY_OFFSET_SUBTRACT ? -memory.offset.immediate : memory.offset.immediate, pc, buffer, blen);
ADVANCE(written); ADVANCE(written);
} else { } else {
written = _decodeRegister(memory.baseReg, buffer, blen); written = _decodeRegister(memory.baseReg, buffer, blen);