Stub out more load/stores with immediates

This commit is contained in:
Jeffrey Pfau 2013-04-09 23:34:25 -07:00
parent 39c776eb37
commit e3818cf7b6
1 changed files with 20 additions and 7 deletions

View File

@ -61,17 +61,24 @@ static const ThumbInstruction _thumbTable[0x400];
BODY; \
}
#define DEFINE_SHIFT_1_INSTRUCTION_EX_THUMB(NAME, IMMEDIATE, BODY) \
#define DEFINE_IMMEDIATE_5_INSTRUCTION_EX_THUMB(NAME, IMMEDIATE, BODY) \
DEFINE_INSTRUCTION_THUMB(NAME, \
int immediate = IMMEDIATE; \
BODY;)
#define DEFINE_SHIFT_1_INSTRUCTION_THUMB(NAME, BODY) \
COUNT_5(DEFINE_SHIFT_1_INSTRUCTION_EX_THUMB, NAME ## 1_, BODY)
#define DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(NAME, BODY) \
COUNT_5(DEFINE_IMMEDIATE_5_INSTRUCTION_EX_THUMB, NAME ## _, BODY)
DEFINE_SHIFT_1_INSTRUCTION_THUMB(LSL, )
DEFINE_SHIFT_1_INSTRUCTION_THUMB(LSR, )
DEFINE_SHIFT_1_INSTRUCTION_THUMB(ASR, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(LSL1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(LSR1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(ASR1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(LDR1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(LDRB1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(LDRH1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(STR1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(STRB1, )
DEFINE_IMMEDIATE_5_INSTRUCTION_THUMB(STRH1, )
#define DEFINE_DATA_FORM_1_INSTRUCTION_EX_THUMB(NAME, RM, BODY) \
DEFINE_INSTRUCTION_THUMB(NAME, \
@ -236,7 +243,13 @@ DEFINE_INSTRUCTION_THUMB(BX, )
APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDR2_R)) \
APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDRH2_R)) \
APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDRB2_R)) \
APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDRSH_R))
APPLY(COUNT_3, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDRSH_R)) \
APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, STR1_)) \
APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDR1_)) \
APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, STRB1_)) \
APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDRB1_)) \
APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, STRH1_)) \
APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDRH1_)) \
static const ThumbInstruction _thumbTable[0x400] = {
DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)