dyncom: Handle the case where PC is the source register for STR/VSTM/VLDM

This commit is contained in:
Lioncash 2015-07-29 04:13:46 -04:00
parent 7c7eeb9d34
commit 2e420aba3c
2 changed files with 40 additions and 21 deletions

View file

@ -5997,7 +5997,12 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
ldst_inst* inst_cream = (ldst_inst*)inst_base->component;
inst_cream->get_addr(cpu, inst_cream->inst, addr);
unsigned int value = cpu->Reg[BITS(inst_cream->inst, 12, 15)];
unsigned int reg = BITS(inst_cream->inst, 12, 15);
unsigned int value = cpu->Reg[reg];
if (reg == 15)
value += 2 * cpu->GetInstructionSize();
cpu->WriteMemory32(addr, value);
}
cpu->Reg[15] += cpu->GetInstructionSize();