From 08065d865d1b435000084fbda184161edb4d7902 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 9 Apr 2013 23:45:08 -0700 Subject: [PATCH] Stub out ADD from PC and SP --- src/isa-thumb.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/isa-thumb.c b/src/isa-thumb.c index ac5ab8b3b..9500ea6ba 100644 --- a/src/isa-thumb.c +++ b/src/isa-thumb.c @@ -154,17 +154,20 @@ DEFINE_INSTRUCTION_WITH_HIGH_THUMB(ADD4, ) DEFINE_INSTRUCTION_WITH_HIGH_THUMB(CMP3, ) DEFINE_INSTRUCTION_WITH_HIGH_THUMB(MOV3, ) -#define DEFINE_LOAD_WITH_IMMEDIATE_EX_THUMB(NAME, RD, BODY) \ +#define DEFINE_IMMEDIATE_WITH_REGISTER_EX_THUMB(NAME, RD, BODY) \ DEFINE_INSTRUCTION_THUMB(NAME, \ int rd = RD; \ BODY;) -#define DEFINE_LOAD_WITH_IMMEDIATE_THUMB(NAME, BODY) \ - COUNT_3(DEFINE_LOAD_WITH_IMMEDIATE_EX_THUMB, NAME ## _R, BODY) +#define DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(NAME, BODY) \ + COUNT_3(DEFINE_IMMEDIATE_WITH_REGISTER_EX_THUMB, NAME ## _R, BODY) -DEFINE_LOAD_WITH_IMMEDIATE_THUMB(LDR3, ) -DEFINE_LOAD_WITH_IMMEDIATE_THUMB(LDR4, ) -DEFINE_LOAD_WITH_IMMEDIATE_THUMB(STR3, ) +DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(LDR3, ) +DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(LDR4, ) +DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(STR3, ) + +DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(ADD5, ) +DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(ADD6, ) #define DEFINE_LOAD_STORE_WITH_REGISTER_EX_THUMB(NAME, RM, BODY) \ DEFINE_INSTRUCTION_THUMB(NAME, \ @@ -254,6 +257,8 @@ DEFINE_INSTRUCTION_THUMB(BX, ) APPLY(COUNT_5, DUMMY, DECLARE_INSTRUCTION_THUMB(EMITTER, LDRH1_)) \ APPLY(COUNT_3, DUMMY_4, DECLARE_INSTRUCTION_THUMB(EMITTER, STR3_R)) \ APPLY(COUNT_3, DUMMY_4, DECLARE_INSTRUCTION_THUMB(EMITTER, LDR4_R)) \ + APPLY(COUNT_3, DUMMY_4, DECLARE_INSTRUCTION_THUMB(EMITTER, ADD5_R)) \ + APPLY(COUNT_3, DUMMY_4, DECLARE_INSTRUCTION_THUMB(EMITTER, ADD6_R)) \ static const ThumbInstruction _thumbTable[0x400] = { DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)