all repos — mgba @ eed0e77079187b0e81b8174d3162faad1270112b

mGBA Game Boy Advance Emulator

Implement B(1)
Jeffrey Pfau jeffrey@endrift.com
Fri, 12 Apr 2013 22:58:50 -0700
commit

eed0e77079187b0e81b8174d3162faad1270112b

parent

be8849d7fee55a813aa828bf94c7620d63ca94d5

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

jump to
M src/isa-thumb.csrc/isa-thumb.c

@@ -277,7 +277,9 @@

#define DEFINE_CONDITIONAL_BRANCH_THUMB(COND) \ DEFINE_INSTRUCTION_THUMB(B ## COND, \ if (ARM_COND_ ## COND) { \ - ARM_STUB; \ + int8_t immediate = opcode; \ + cpu->gprs[ARM_PC] += immediate << 1; \ + THUMB_WRITE_PC; \ }) DEFINE_CONDITIONAL_BRANCH_THUMB(EQ)