Stub out format 8

This commit is contained in:
Jeffrey Pfau 2013-04-09 22:51:21 -07:00
parent be021605bc
commit 5e18eabd04
1 changed files with 35 additions and 2 deletions

View File

@ -84,8 +84,6 @@ DEFINE_SHIFT_1_INSTRUCTION_THUMB(ASR, )
DEFINE_DATA_FORM_1_INSTRUCTION_THUMB(ADD, )
DEFINE_DATA_FORM_1_INSTRUCTION_THUMB(SUB, )
#define DECLARE_INSTRUCTION_THUMB(EMITTER, NAME) \
EMITTER ## NAME
#define DEFINE_DATA_FORM_2_INSTRUCTION_EX_THUMB(NAME, IMMEDIATE, BODY) \
DEFINE_INSTRUCTION_THUMB(NAME, \
int immediate = IMMEDIATE; \
@ -133,6 +131,33 @@ DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(MUL, )
DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(BIC, )
DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(MVN, )
#define DEFINE_INSTRUCTION_WITH_HIGH_EX_THUMB(NAME, H1, H2, BODY) \
DEFINE_INSTRUCTION_THUMB(NAME, \
int rd = opcode & 0x0007 | H1; \
int rm = (opcode >> 3) & 0x0007 | H2; \
BODY;)
#define DEFINE_INSTRUCTION_WITH_HIGH_THUMB(NAME, BODY) \
DEFINE_INSTRUCTION_WITH_HIGH_EX_THUMB(NAME ## 00, 0, 0, BODY) \
DEFINE_INSTRUCTION_WITH_HIGH_EX_THUMB(NAME ## 01, 0, 8, BODY) \
DEFINE_INSTRUCTION_WITH_HIGH_EX_THUMB(NAME ## 10, 8, 0, BODY) \
DEFINE_INSTRUCTION_WITH_HIGH_EX_THUMB(NAME ## 11, 8, 8, BODY)
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(ADD4, )
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(CMP3, )
DEFINE_INSTRUCTION_WITH_HIGH_THUMB(MOV3, )
DEFINE_INSTRUCTION_THUMB(ILL, )
#define DECLARE_INSTRUCTION_THUMB(EMITTER, NAME) \
EMITTER ## NAME
#define DECLARE_INSTRUCTION_WITH_HIGH_THUMB(EMITTER, NAME) \
DECLARE_INSTRUCTION_THUMB(EMITTER, NAME ## 00), \
DECLARE_INSTRUCTION_THUMB(EMITTER, NAME ## 01), \
DECLARE_INSTRUCTION_THUMB(EMITTER, NAME ## 10), \
DECLARE_INSTRUCTION_THUMB(EMITTER, NAME ## 11)
#define DUMMY(X, ...) X,
#define DUMMY_4(...) \
DUMMY(__VA_ARGS__) \
@ -168,6 +193,14 @@ DEFINE_DATA_FORM_5_INSTRUCTION_THUMB(MVN, )
DECLARE_INSTRUCTION_THUMB(EMITTER, MUL), \
DECLARE_INSTRUCTION_THUMB(EMITTER, BIC), \
DECLARE_INSTRUCTION_THUMB(EMITTER, MVN), \
DECLARE_INSTRUCTION_WITH_HIGH_THUMB(EMITTER, ADD4), \
DECLARE_INSTRUCTION_WITH_HIGH_THUMB(EMITTER, CMP3), \
DECLARE_INSTRUCTION_WITH_HIGH_THUMB(EMITTER, MOV3), \
DECLARE_INSTRUCTION_THUMB(EMITTER, ILL), \
DECLARE_INSTRUCTION_THUMB(EMITTER, ILL), \
DECLARE_INSTRUCTION_THUMB(EMITTER, ILL), \
DECLARE_INSTRUCTION_THUMB(EMITTER, ILL), \
DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)
static const ThumbInstruction _thumbTable[0x400] = {
DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)