summaryrefslogtreecommitdiffstats
path: root/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2016-08-22 16:06:35 +0200
committerMerryMage <MerryMage@users.noreply.github.com>2016-08-22 16:13:33 +0200
commit15b2eec4bdeadb6287a45c8d6fc77260280b45c8 (patch)
treea591c269b37df61ba81873e72ea45bccd8bc8d37 /src/core/arm/dyncom/arm_dyncom_interpreter.cpp
parentcitra: Default to HW renderer. (diff)
downloadyuzu-15b2eec4bdeadb6287a45c8d6fc77260280b45c8.tar
yuzu-15b2eec4bdeadb6287a45c8d6fc77260280b45c8.tar.gz
yuzu-15b2eec4bdeadb6287a45c8d6fc77260280b45c8.tar.bz2
yuzu-15b2eec4bdeadb6287a45c8d6fc77260280b45c8.tar.lz
yuzu-15b2eec4bdeadb6287a45c8d6fc77260280b45c8.tar.xz
yuzu-15b2eec4bdeadb6287a45c8d6fc77260280b45c8.tar.zst
yuzu-15b2eec4bdeadb6287a45c8d6fc77260280b45c8.zip
Diffstat (limited to '')
-rw-r--r--src/core/arm/dyncom/arm_dyncom_interpreter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
index 6d5fb7aec..c8d45c6db 100644
--- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
+++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp
@@ -2820,10 +2820,12 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
operand2 = (BIT(RS, 15)) ? (BITS(RS, 0, 15) | 0xffff0000) : BITS(RS, 0, 15);
else
operand2 = (BIT(RS, 31)) ? (BITS(RS, 16, 31) | 0xffff0000) : BITS(RS, 16, 31);
- RD = operand1 * operand2 + RN;
- if (AddOverflow(operand1 * operand2, RN, RD))
+ u32 product = operand1 * operand2;
+ u32 result = product + RN;
+ if (AddOverflow(product, RN, result))
cpu->Cpsr |= (1 << 27);
+ RD = result;
}
cpu->Reg[15] += cpu->GetInstructionSize();
INC_PC(sizeof(smla_inst));