ARM9: Fix LDMv5 writeback

This commit is contained in:
Vicki Pfau 2017-02-19 13:06:43 -08:00
parent 107ffdb2cb
commit 5ebf24b621
1 changed files with 4 additions and 1 deletions

View File

@ -262,7 +262,10 @@ static inline void _immediate(struct ARMCore* cpu, uint32_t opcode) {
cpu->gprs[rn] = address; \
}
#define ADDR_MODE_4_WRITEBACK_LDMv5 ADDR_MODE_4_WRITEBACK_LDM
#define ADDR_MODE_4_WRITEBACK_LDMv5 \
if (!((1 << rn) & rs) || !(((1 << rn) - 1) & rs)) { \
cpu->gprs[rn] = address; \
}
#define ADDR_MODE_4_WRITEBACK_STM cpu->gprs[rn] = address;