Merge pull request #1008 from lioncash/pc

dyncom: Handle the case where PC is the source register for STR/VSTM/VLDM
This commit is contained in:
bunnei 2015-07-30 10:44:50 -04:00
commit ce65925bc3
2 changed files with 40 additions and 21 deletions

View file

@ -5994,7 +5994,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();