From 626c5fa805dd9703405080df44e20e9d7871c59d Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Wed, 9 Jun 2021 02:01:47 +0300 Subject: [PATCH] core: arm7tdmi: Fix new bug in LDR/STR introduced in b603904. Of course only arm-wrestler caught it while mgba suite/eggvance did not :( Former-commit-id: a5dcaa9b40c8a5a5d5fb1e531a601361869a041f Former-commit-id: eb8d30a3c1cf9c39425b29e6d8386ac2b68a424b --- core/src/arm7tdmi/arm/exec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/arm7tdmi/arm/exec.rs b/core/src/arm7tdmi/arm/exec.rs index b893852..4787fa4 100644 --- a/core/src/arm7tdmi/arm/exec.rs +++ b/core/src/arm7tdmi/arm/exec.rs @@ -293,7 +293,7 @@ impl Core { } let mut carry = self.cpsr.C(); let offset = self.get_barrel_shifted_value(&insn.ldr_str_offset(), &mut carry); // TODO: wrong to use in here - self.cpsr.set_C(carry); + drop(carry); let effective_addr = (addr as i32).wrapping_add(offset as i32) as Addr; // TODO - confirm this