fix stmd(a/b) writeback

This commit is contained in:
Jaklyy 2024-06-02 22:41:01 -04:00
parent 5e760a1536
commit c2a57b79a0
1 changed files with 6 additions and 2 deletions

View File

@ -558,8 +558,12 @@ void A_STM(ARM* cpu)
if (cpu->CurInstr & (1<<22)) if (cpu->CurInstr & (1<<22))
cpu->UpdateMode((cpu->CPSR&~0x1F)|0x10, cpu->CPSR, true); cpu->UpdateMode((cpu->CPSR&~0x1F)|0x10, cpu->CPSR, true);
if ((cpu->CurInstr & (1<<23)) && (cpu->CurInstr & (1<<21)) && !dataabort) if (!dataabort)
{
if ((cpu->CurInstr & (1<<23)) && (cpu->CurInstr & (1<<21)))
cpu->R[baseid] = base; cpu->R[baseid] = base;
}
else cpu->R[baseid] = oldbase;
cpu->AddCycles_CD(); cpu->AddCycles_CD();
} }