fix(cpu): write results of ORR to destination register

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-10-21 05:11:54 -03:00
parent 780c717409
commit 9a5959e46c
1 changed files with 1 additions and 0 deletions

View File

@ -76,6 +76,7 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4
0xC => { 0xC => {
// ORR // ORR
const result = cpu.r[op1] | op2; const result = cpu.r[op1] | op2;
cpu.r[rd] = result;
if (S and rd != 0xF) { if (S and rd != 0xF) {
cpu.cpsr.n.write(result >> 31 & 1 == 1); cpu.cpsr.n.write(result >> 31 & 1 == 1);