From 7fb18b11552374df2cd51454cca7ce8fbdc583bc Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:03:58 -0400 Subject: [PATCH] clean up code --- src/ARMInterpreter_LoadStore.cpp | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/src/ARMInterpreter_LoadStore.cpp b/src/ARMInterpreter_LoadStore.cpp index e8e6accc..59b9bc30 100644 --- a/src/ARMInterpreter_LoadStore.cpp +++ b/src/ARMInterpreter_LoadStore.cpp @@ -450,30 +450,16 @@ void ReglessLDMSTM(ARM* cpu, const bool load, const u8 baseid, const bool writeb if (load) { u32 pc; - if (cpu->DataRead32(base, &pc)) - { - cpu->AddCycles_CDI(); - cpu->JumpTo(pc, usermode); // checkme can we restore cpsr? - } - else - { - cpu->AddCycles_CDI(); - ((ARMv5*)cpu)->DataAbort(); - return; - } + cpu->DataRead32(base, &pc); + + cpu->AddCycles_CDI(); + cpu->JumpTo(pc, usermode); } else { - if (!cpu->DataWrite32(base, cpu->R[15] + (thumb ? 2 : 4))) - { - cpu->AddCycles_CD(); - ((ARMv5*)cpu)->DataAbort(); - return; - } - else - { - cpu->AddCycles_CD(); - } + cpu->DataWrite32(base, cpu->R[15] + (thumb ? 2 : 4)); + + cpu->AddCycles_CD(); } } else