all repos — mgba @ d5adcac319ca47b98fcc81e4c1699dc6510f41ee

mGBA Game Boy Advance Emulator

Stub out LDMIA/STMIA
Jeffrey Pfau jeffrey@endrift.com
Wed, 10 Apr 2013 20:58:05 -0700
commit

d5adcac319ca47b98fcc81e4c1699dc6510f41ee

parent

0db11ec6bbb812b4b5fc6f5732db342afe042d77

1 files changed, 14 insertions(+), 0 deletions(-)

jump to
M src/isa-thumb.csrc/isa-thumb.c

@@ -188,6 +188,17 @@ DEFINE_LOAD_STORE_WITH_REGISTER_THUMB(STR2, )

DEFINE_LOAD_STORE_WITH_REGISTER_THUMB(STRB2, ) DEFINE_LOAD_STORE_WITH_REGISTER_THUMB(STRH2, ) +#define DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(NAME, RS, BODY) \ + DEFINE_INSTRUCTION_THUMB(NAME, \ + int rs = RS; \ + BODY;) + +#define DEFINE_LOAD_STORE_MULTIPLE_THUMB(NAME, BODY) \ + COUNT_3(DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB, NAME ## _R, BODY) + +DEFINE_LOAD_STORE_MULTIPLE_THUMB(LDMIA, ) +DEFINE_LOAD_STORE_MULTIPLE_THUMB(STMIA, ) + DEFINE_INSTRUCTION_THUMB(ADD7, ) DEFINE_INSTRUCTION_THUMB(SUB4, )

@@ -285,6 +296,9 @@ DO_8(DECLARE_INSTRUCTION_THUMB(EMITTER, ILL)), \

DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, POP)), \ DO_4(DECLARE_INSTRUCTION_THUMB(EMITTER, POPR)), \ 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)) \ static const ThumbInstruction _thumbTable[0x400] = { DECLARE_THUMB_EMITTER_BLOCK(_ThumbInstruction)