all repos — mgba @ 6450ce16b2c828713a0a2c766f6ada8e2b6ec6a2

mGBA Game Boy Advance Emulator

Fix LDR(3)
Jeffrey Pfau jeffrey@endrift.com
Sun, 28 Apr 2013 01:33:45 -0700
commit

6450ce16b2c828713a0a2c766f6ada8e2b6ec6a2

parent

e86f7d79fba719eb1af1f102b1e0951d27ed3414

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

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

@@ -313,7 +313,7 @@

#define DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(NAME, BODY) \ COUNT_3(DEFINE_IMMEDIATE_WITH_REGISTER_EX_THUMB, NAME ## _R, BODY) -DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(LDR3, cpu->gprs[rd] = cpu->memory->load32(cpu->memory, cpu->gprs[ARM_PC] + immediate)) +DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(LDR3, cpu->gprs[rd] = cpu->memory->load32(cpu->memory, (cpu->gprs[ARM_PC] & 0xFFFFFFFC) + immediate)) DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(LDR4, cpu->gprs[rd] = cpu->memory->load32(cpu->memory, cpu->gprs[ARM_SP] + immediate)) DEFINE_IMMEDIATE_WITH_REGISTER_THUMB(STR3, cpu->memory->store32(cpu->memory, cpu->gprs[ARM_SP] + immediate, cpu->gprs[rd]))