From e2f3dd1e6f1ae6602c5dc63f65ffb4908203ad7f Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:27:36 -0400 Subject: [PATCH] clarify --- src/ARMInterpreter_ALU.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ARMInterpreter_ALU.cpp b/src/ARMInterpreter_ALU.cpp index 54c1d6d3..46c703cd 100644 --- a/src/ARMInterpreter_ALU.cpp +++ b/src/ARMInterpreter_ALU.cpp @@ -766,7 +766,8 @@ void A_MUL(ARM* cpu) u32 res = rm * rs; - if (((cpu->CurInstr >> 16) & 0xF) != 15) // check arm7 + // all multiply instructions fail writes to r15 on arm7/9 + if (((cpu->CurInstr >> 16) & 0xF) != 15) cpu->R[(cpu->CurInstr >> 16) & 0xF] = res; if (cpu->CurInstr & (1<<20)) @@ -798,7 +799,7 @@ void A_MLA(ARM* cpu) u32 res = (rm * rs) + rn; - if (((cpu->CurInstr >> 16) & 0xF) != 15) // check arm7 + if (((cpu->CurInstr >> 16) & 0xF) != 15) cpu->R[(cpu->CurInstr >> 16) & 0xF] = res; if (cpu->CurInstr & (1<<20)) @@ -1110,6 +1111,7 @@ void A_QADD(ARM* cpu) cpu->CPSR |= 0x08000000; } + // all saturated math instructions fail writes to r15 if (((cpu->CurInstr >> 12) & 0xF) != 15) cpu->R[(cpu->CurInstr >> 12) & 0xF] = res;