From 47fc96fe001670ceb2092cb06da4590c33835411 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Fri, 21 Oct 2022 05:12:00 -0300 Subject: [PATCH] feat(cpu): implement BIC --- src/cpu/arm/data_processing.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/cpu/arm/data_processing.zig b/src/cpu/arm/data_processing.zig index 01e6d22..b82b58e 100644 --- a/src/cpu/arm/data_processing.zig +++ b/src/cpu/arm/data_processing.zig @@ -146,6 +146,17 @@ pub fn dataProcessing(comptime I: bool, comptime S: bool, comptime instrKind: u4 // C set by Barrel Shifter, V is unaffected } }, + 0xE => { + // BIC + const result = op1 & ~op2; + cpu.r[rd] = result; + + if (S and rd != 0xF) { + cpu.cpsr.n.write(result >> 31 & 1 == 1); + cpu.cpsr.z.write(result == 0); + // C set by Barrel Shifter, V is unaffected + } + }, 0xF => { // MVN const result = ~op2;