all repos — mgba @ 9ab3b0c20a38d1dfadf850f7ea1b4e35e905ecdb

mGBA Game Boy Advance Emulator

Implement ADD(7)/SUB(4)
Jeffrey Pfau jeffrey@endrift.com
Fri, 12 Apr 2013 02:22:37 -0700
commit

9ab3b0c20a38d1dfadf850f7ea1b4e35e905ecdb

parent

1ac7f0eb1513e31a6377ab52c16d2e3733868b98

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

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

@@ -245,8 +245,8 @@ DEFINE_CONDITIONAL_BRANCH_THUMB(LT)

DEFINE_CONDITIONAL_BRANCH_THUMB(GT) DEFINE_CONDITIONAL_BRANCH_THUMB(LE) -DEFINE_INSTRUCTION_THUMB(ADD7, ARM_STUB) -DEFINE_INSTRUCTION_THUMB(SUB4, ARM_STUB) +DEFINE_INSTRUCTION_THUMB(ADD7, cpu->gprs[ARM_SP] += (opcode & 0x7F) << 2) +DEFINE_INSTRUCTION_THUMB(SUB4, cpu->gprs[ARM_SP] -= (opcode & 0x7F) << 2) DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(POP, \ opcode & 0x00FF, \