all repos — mgba @ a6f895da7d1cc6a7664d7d0aba44c11921cf99f0

mGBA Game Boy Advance Emulator

Debugger: Align PC-relative loads in Thumb
Jeffrey Pfau jeffrey@endrift.com
Thu, 25 Dec 2014 02:37:26 -0800
commit

a6f895da7d1cc6a7664d7d0aba44c11921cf99f0

parent

8515036cb97a4dad6564f562471eb802d0258c85

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -28,6 +28,7 @@ - GBA Video: Fix blend issues with obscured middle layers

- 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
M src/arm/decoder.csrc/arm/decoder.c

@@ -127,7 +127,7 @@ ADVANCE(1);

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);