diff --git a/src/ARMInterpreter_LoadStore.cpp b/src/ARMInterpreter_LoadStore.cpp index 91acaacc..e21d7757 100644 --- a/src/ARMInterpreter_LoadStore.cpp +++ b/src/ARMInterpreter_LoadStore.cpp @@ -429,10 +429,10 @@ void A_LDM(ARM* cpu) if (!preinc) base += 4; } } - + + u32 pc; if (cpu->CurInstr & (1<<15)) { - u32 pc; if (preinc) base += 4; if (first) cpu->DataRead32 (base, &pc); else cpu->DataRead32S(base, &pc); @@ -440,8 +440,6 @@ void A_LDM(ARM* cpu) if (cpu->Num == 1) pc &= ~0x1; - - cpu->JumpTo(pc, cpu->CurInstr & (1<<22)); } if ((cpu->CurInstr & (1<<22)) && !(cpu->CurInstr & (1<<15))) @@ -466,6 +464,9 @@ void A_LDM(ARM* cpu) cpu->R[baseid] = wbbase; } + if (cpu->CurInstr & (1<<15)) + cpu->JumpTo(pc, cpu->CurInstr & (1<<22)); + cpu->AddCycles_CDI(); }