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
This commit is contained in:
parent
97704f2621
commit
626c5fa805
|
@ -293,7 +293,7 @@ impl<I: MemoryInterface> Core<I> {
|
||||||
}
|
}
|
||||||
let mut carry = self.cpsr.C();
|
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
|
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;
|
let effective_addr = (addr as i32).wrapping_add(offset as i32) as Addr;
|
||||||
|
|
||||||
// TODO - confirm this
|
// TODO - confirm this
|
||||||
|
|
Reference in a new issue