Implement ADD(6)
Jeffrey Pfau jeffrey@endrift.com
Fri, 12 Apr 2013 19:59:55 -0700
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/isa-thumb.c
→
src/isa-thumb.c
@@ -170,6 +170,7 @@
#define DEFINE_IMMEDIATE_WITH_REGISTER_EX_THUMB(NAME, RD, BODY) \ DEFINE_INSTRUCTION_THUMB(NAME, \ int rd = RD; \ + int immediate = (opcode & 0x00FF) << 2; \ BODY;) #define DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(NAME, BODY) \@@ -180,7 +181,7 @@ DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(LDR4, ARM_STUB)
DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(STR3, ARM_STUB) DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(ADD5, ARM_STUB) -DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(ADD6, ARM_STUB) +DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(ADD6, cpu->gprs[rd] = cpu->gprs[ARM_SP] + immediate) #define DEFINE_LOAD_STORE_WITH_REGISTER_EX_THUMB(NAME, RM, BODY) \ DEFINE_INSTRUCTION_THUMB(NAME, \