all repos — mgba @ 53a52d8cf8954a1689cc0b8da79dab0ca09ee1f7

mGBA Game Boy Advance Emulator

Call setActiveRegion with the right address
Jeffrey Pfau jeffrey@endrift.com
Sat, 02 Nov 2013 03:56:13 -0700
commit

53a52d8cf8954a1689cc0b8da79dab0ca09ee1f7

parent

e0eefa24da253ee1cfce2c86f757fc6c576ae46c

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

jump to
M src/arm/isa-inlines.hsrc/arm/isa-inlines.h

@@ -67,12 +67,12 @@ #define ARM_STUB cpu->board->hitStub(cpu->board, opcode)

#define ARM_WRITE_PC \ cpu->gprs[ARM_PC] = (cpu->gprs[ARM_PC] & -WORD_SIZE_ARM) + WORD_SIZE_ARM; \ - cpu->memory->setActiveRegion(cpu->memory, cpu->gprs[ARM_PC]); \ + cpu->memory->setActiveRegion(cpu->memory, cpu->gprs[ARM_PC] - WORD_SIZE_ARM); \ currentCycles += 2 + cpu->memory->activeNonseqCycles32 + cpu->memory->activePrefetchCycles32; #define THUMB_WRITE_PC \ cpu->gprs[ARM_PC] = (cpu->gprs[ARM_PC] & -WORD_SIZE_THUMB) + WORD_SIZE_THUMB; \ - cpu->memory->setActiveRegion(cpu->memory, cpu->gprs[ARM_PC]); \ + cpu->memory->setActiveRegion(cpu->memory, cpu->gprs[ARM_PC] - WORD_SIZE_THUMB); \ currentCycles += 2 + cpu->memory->activeNonseqCycles16 + cpu->memory->activePrefetchCycles16; static inline int _ARMModeHasSPSR(enum PrivilegeMode mode) {