ARM7: Fix ARM multiply instructions when PC is a destination register
Jeffrey Pfau jeffrey@endrift.com
Sat, 09 May 2015 13:40:58 -0700
2 files changed,
5 insertions(+),
5 deletions(-)
M
CHANGES
→
CHANGES
@@ -50,6 +50,7 @@ - GBA: Handle out-of-bounds I/O access
- GBA: Fix bounds-checking on EEPROM access - ARM7: Make illegal instruction decoding consistent between ARM and Thumb - GBA BIOS: Initialize a variable that may be uninitialized in very rare cases + - ARM7: Fix ARM multiply instructions when PC is a destination register Misc: - Qt: Show multiplayer numbers in window title - Qt: Handle saving input settings better
M
src/arm/isa-arm.c
→
src/arm/isa-arm.c
@@ -327,13 +327,12 @@ int rd = (opcode >> 12) & 0xF; \
int rdHi = (opcode >> 16) & 0xF; \ int rs = (opcode >> 8) & 0xF; \ int rm = opcode & 0xF; \ - UNUSED(rdHi); \ + if (rdHi == ARM_PC || rd == ARM_PC) { \ + return; \ + } \ ARM_WAIT_MUL(cpu->gprs[rs]); \ BODY; \ - S_BODY; \ - if (rd == ARM_PC) { \ - ARM_WRITE_PC; \ - }) + S_BODY;) #define DEFINE_MULTIPLY_INSTRUCTION_ARM(NAME, BODY, S_BODY) \ DEFINE_MULTIPLY_INSTRUCTION_EX_ARM(NAME, BODY, ) \