ADD/SUB 1 stubs
Jeffrey Pfau jeffrey@endrift.com
Tue, 09 Apr 2013 03:20:32 -0700
1 files changed,
13 insertions(+),
0 deletions(-)
jump to
M
src/isa-thumb.c
→
src/isa-thumb.c
@@ -73,6 +73,17 @@ DEFINE_SHIFT_1_INSTRUCTION_THUMB(LSL, )
DEFINE_SHIFT_1_INSTRUCTION_THUMB(LSR, ) DEFINE_SHIFT_1_INSTRUCTION_THUMB(ASR, ) +#define DEFINE_ADD_SUB_1_INSTRUCTION_EX_THUMB(NAME, IMMEDIATE, BODY) \ + DEFINE_INSTRUCTION_THUMB(NAME, \ + int immediate = IMMEDIATE; \ + BODY;) + +#define DEFINE_ADD_SUB_1_INSTRUCTION_THUMB(NAME, BODY) \ + COUNT_3(DEFINE_ADD_SUB_1_INSTRUCTION_EX_THUMB, NAME ## 1_, BODY) + +DEFINE_ADD_SUB_1_INSTRUCTION_THUMB(ADD, ) +DEFINE_ADD_SUB_1_INSTRUCTION_THUMB(SUB, ) + #define DEFINE_ADD_SUB_3_INSTRUCTION_EX_THUMB(NAME, RM, BODY) \ DEFINE_INSTRUCTION_THUMB(NAME, \ int rm = RM; \@@ -94,6 +105,8 @@ APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LSR1_)) \
APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, ASR1_)) \ APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, ADD3_R)) \ APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, SUB3_R)) \ + APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, ADD1_)) \ + APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, SUB1_)) \ static const ThumbInstruction _thumbTable[0x400] = { DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)