all repos — mgba @ bda71cafc2410f7d2782c4f37e8043db451c1c04

mGBA Game Boy Advance Emulator

ALU instructions can write to PC
Jeffrey Pfau jeffrey@endrift.com
Sun, 07 Apr 2013 02:01:14 -0700
commit

bda71cafc2410f7d2782c4f37e8043db451c1c04

parent

6e3a9a95082d0dc6b563549bb2fd25cadf9645a2

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

jump to
M src/arm.csrc/arm.c

@@ -207,7 +207,10 @@ int rn = (opcode >> 16) & 0xF; \

SHIFTER(cpu, opcode); \ BODY; \ S_BODY; \ - POST_BODY;) + POST_BODY; \ + if (rd == ARM_PC) { \ + ARM_WRITE_PC; \ + }) #define DEFINE_ALU_INSTRUCTION_ARM(NAME, S_BODY, BODY, POST_BODY) \ DEFINE_ALU_INSTRUCTION_EX_ARM(NAME, , _barrelShift, BODY, POST_BODY) \