Debugger: Align PC-relative loads in Thumb

This commit is contained in:
Jeffrey Pfau 2014-12-25 02:37:26 -08:00
parent a585671eb8
commit 1183a6145c
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ Bugfixes:
- Video: Ensure FFmpeg encoder has audio frames
- Video: Fix uncompressed PCM audio recording
- GBA Video: Fix windows not disabling target 1 appropriately (fixes #161)
- Debugger: Align PC-relative loads in Thumb
Misc:
- Qt: Disable sync to video by default
- 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;
if (memory.format & ARM_MEMORY_REGISTER_BASE) {
if (memory.baseReg == ARM_PC && memory.format & ARM_MEMORY_IMMEDIATE_OFFSET) {
written = _decodePCRelative(memory.format & ARM_MEMORY_OFFSET_SUBTRACT ? -memory.offset.immediate : memory.offset.immediate, pc, buffer, blen);
written = _decodePCRelative(memory.format & ARM_MEMORY_OFFSET_SUBTRACT ? -memory.offset.immediate : memory.offset.immediate, pc & 0xFFFFFFFC, buffer, blen);
ADVANCE(written);
} else {
written = _decodeRegister(memory.baseReg, buffer, blen);