From 67d25794e1a8b04269742b0d46da927eef30f008 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 20 Apr 2013 18:03:59 -0700 Subject: [PATCH] Fix LDMIA/STMIA --- src/arm/isa-thumb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arm/isa-thumb.c b/src/arm/isa-thumb.c index 62d580c71..230f32b15 100644 --- a/src/arm/isa-thumb.c +++ b/src/arm/isa-thumb.c @@ -319,10 +319,10 @@ DEFINE_LOAD_STORE_WITH_REGISTER_THUMB(STR2, ARM_STUB) DEFINE_LOAD_STORE_WITH_REGISTER_THUMB(STRB2, ARM_STUB) DEFINE_LOAD_STORE_WITH_REGISTER_THUMB(STRH2, ARM_STUB) -#define DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(NAME, RS, ADDRESS, LOOP, BODY, OP, PRE_BODY, POST_BODY, WRITEBACK) \ +#define DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(NAME, RN, ADDRESS, LOOP, BODY, OP, PRE_BODY, POST_BODY, WRITEBACK) \ DEFINE_INSTRUCTION_THUMB(NAME, \ - int rn = (opcode >> 8) & 0x000F; \ - int rs = RS; \ + int rn = RN; \ + int rs = opcode & 0xFF; \ int32_t address = ADDRESS; \ int m; \ int i; \