Stub out conditional branches
Jeffrey Pfau jeffrey@endrift.com
Wed, 10 Apr 2013 21:04:41 -0700
1 files changed,
35 insertions(+),
0 deletions(-)
jump to
M
src/isa-thumb.c
→
src/isa-thumb.c
@@ -199,6 +199,26 @@
DEFINE_LOAD_STORE_MULTIPLE_THUMB(LDMIA, ) DEFINE_LOAD_STORE_MULTIPLE_THUMB(STMIA, ) +#define DEFINE_CONDITIONAL_BRANCH_THUMB(COND) \ + DEFINE_INSTRUCTION_THUMB(B ## COND, \ + if (ARM_COND_ ## COND) { \ + }) + +DEFINE_CONDITIONAL_BRANCH_THUMB(EQ) +DEFINE_CONDITIONAL_BRANCH_THUMB(NE) +DEFINE_CONDITIONAL_BRANCH_THUMB(CS) +DEFINE_CONDITIONAL_BRANCH_THUMB(CC) +DEFINE_CONDITIONAL_BRANCH_THUMB(MI) +DEFINE_CONDITIONAL_BRANCH_THUMB(PL) +DEFINE_CONDITIONAL_BRANCH_THUMB(VS) +DEFINE_CONDITIONAL_BRANCH_THUMB(VC) +DEFINE_CONDITIONAL_BRANCH_THUMB(LS) +DEFINE_CONDITIONAL_BRANCH_THUMB(HI) +DEFINE_CONDITIONAL_BRANCH_THUMB(GE) +DEFINE_CONDITIONAL_BRANCH_THUMB(LT) +DEFINE_CONDITIONAL_BRANCH_THUMB(GT) +DEFINE_CONDITIONAL_BRANCH_THUMB(LE) + DEFINE_INSTRUCTION_THUMB(ADD7, ) DEFINE_INSTRUCTION_THUMB(SUB4, )@@ -299,6 +319,21 @@ DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BKPT)), \
DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ APPLY(COUNT_3, DUMMY_4, DECLARE_INSTRUCTION_THUMB(EMITTER, STMIA_R)) \ APPLY(COUNT_3, DUMMY_4, DECLARE_INSTRUCTION_THUMB(EMITTER, LDMIA_R)) \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BEQ)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BNE)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BCS)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BCC)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BMI)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BPL)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BVS)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BVC)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BHI)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BLS)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BGE)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BLT)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BGT)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, BLE)), \ + DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \ static const ThumbInstruction _thumbTable[0x400] = { DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)