From 74292364713fb0e2258343b38800499f115684c1 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Fri, 26 Jul 2019 17:54:13 +0300 Subject: [PATCH] Fix mistake in UMLAL Former-commit-id: 6fe9bdf5471b71b58dcf9ee9ffa03c41b24e6301 --- src/core/arm7tdmi/arm/exec.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/arm7tdmi/arm/exec.rs b/src/core/arm7tdmi/arm/exec.rs index d399105..30d1009 100644 --- a/src/core/arm7tdmi/arm/exec.rs +++ b/src/core/arm7tdmi/arm/exec.rs @@ -475,7 +475,9 @@ impl Core { self.add_cycle(); if insn.accumulate_flag() { - result = result.wrapping_add(self.get_reg(rn) as u64); + let hi = self.get_reg(rd_hi) as u64; + let lo = self.get_reg(rd_lo) as u64; + result = result.wrapping_add(hi << 32 | lo); self.add_cycle(); }