all repos — mgba @ fede2118746dd061a9fb453feca04121658ecd39

mGBA Game Boy Advance Emulator

Remove checks for ARM writeback operations that fail on real hardware
Jeffrey Pfau jeffrey@endrift.com
Mon, 20 Jan 2014 15:10:41 -0800
commit

fede2118746dd061a9fb453feca04121658ecd39

parent

35a5e83465444a277bd6a753082ec35ec8ebcc0a

1 files changed, 1 insertions(+), 8 deletions(-)

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

@@ -532,7 +532,6 @@ #define DEFINE_LOAD_STORE_MULTIPLE_INSTRUCTION_EX_ARM(NAME, ADDRESS, WRITEBACK, LOOP, S_PRE, S_POST, BODY, POST_BODY) \

DEFINE_INSTRUCTION_ARM(NAME, \ int rn = (opcode >> 16) & 0xF; \ int rs = opcode & 0x0000FFFF; \ - int writeback = 1; \ int m; \ int i; \ int total = 0; \

@@ -542,9 +541,7 @@ LOOP(BODY); \

S_POST; \ currentCycles += cpu->memory->waitMultiple(cpu->memory, addr, total); \ POST_BODY; \ - if (writeback) { \ - WRITEBACK; \ - }) + WRITEBACK;) #define DEFINE_LOAD_STORE_MULTIPLE_INSTRUCTION_ARM(NAME, BODY, POST_BODY) \

@@ -703,10 +700,6 @@ cpu->gprs[i] = cpu->memory->load32(cpu->memory, addr & 0xFFFFFFFC, 0);,

++currentCycles; if (rs & 0x8000) { ARM_WRITE_PC; - } - int rnx = 1 << rn; - if (rnx & rs && ((rnx - 1) & rs)) { - writeback = 0; }) DEFINE_LOAD_STORE_MULTIPLE_INSTRUCTION_ARM(STM,