dyncom: General cleanup of STM

This commit is contained in:
Lioncash 2015-03-08 21:48:35 -04:00
parent e37425b380
commit 36dab56c31
1 changed files with 14 additions and 16 deletions

View File

@ -5989,23 +5989,21 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
}
}
if (BIT(inst_cream->inst, 13)) {
if (cpu->Mode == USER32MODE) {
if (cpu->Mode == USER32MODE)
Memory::Write32(addr, cpu->Reg[i]);
addr += 4;
} else {
else
Memory::Write32(addr, cpu->Reg_usr[0]);
addr += 4;
}
}
if (BIT(inst_cream->inst, 14)) {
if (cpu->Mode == USER32MODE) {
if (cpu->Mode == USER32MODE)
Memory::Write32(addr, cpu->Reg[i]);
addr += 4;
} else {
else
Memory::Write32(addr, cpu->Reg_usr[1]);
addr += 4;
}
}
if (BIT(inst_cream->inst, 15)) {
Memory::Write32(addr, cpu->Reg_usr[1] + 8);
}
@ -6016,16 +6014,16 @@ unsigned InterpreterMainLoop(ARMul_State* state) {
Memory::Write32(addr, old_RN);
else
Memory::Write32(addr, cpu->Reg[i]);
addr += 4;
}
}
// Check PC reg
if(BIT(inst_cream->inst, i)) {
if (BIT(inst_cream->inst, 15))
Memory::Write32(addr, cpu->Reg_usr[1] + 8);
}
}
}
cpu->Reg[15] += GET_INST_SIZE(cpu);
INC_PC(sizeof(ldst_inst));
FETCH_INST;