fix: force-align ARM STRH reads

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:12:17 -03:00
parent 28361e8b7d
commit 44e8b5b882
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ pub fn halfAndSignedDataTransfer(comptime P: bool, comptime U: bool, comptime I:
} else { } else {
if (opcode >> 5 & 0x01 == 0x01) { if (opcode >> 5 & 0x01 == 0x01) {
// STRH // STRH
bus.write16(address, @truncate(u16, cpu.r[rd])); bus.write16(address & 0xFFFF_FFFE, @truncate(u16, cpu.r[rd]));
} else unreachable; // SWP } else unreachable; // SWP
} }