cpu/thumb: fix multiple load/store

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2024-06-19 14:18:37 +05:30
parent 41b625790e
commit f5aa73e7ca
2 changed files with 7 additions and 6 deletions

View File

@@ -499,10 +499,10 @@ Instruction::exec(Cpu& cpu) {
}
}
} else {
for (int8_t i = 7; i >= 0; i--) {
for (uint8_t i = 0; i < 8; i++) {
if (get_bit(data.regs, i)) {
rb -= alignment;
cpu.bus->write_word(rb, cpu.gpr[i], sequential);
rb += alignment;
sequential = true;
}
}