From 8b574efe857a07a791db68ecc346634ef5983b64 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Wed, 2 Feb 2022 20:12:20 -0400 Subject: [PATCH] fix(cpu): properly negate in NEG --- src/cpu/thumb/format4.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu/thumb/format4.zig b/src/cpu/thumb/format4.zig index ee8964a..4a8bf86 100644 --- a/src/cpu/thumb/format4.zig +++ b/src/cpu/thumb/format4.zig @@ -72,7 +72,7 @@ pub fn format4(comptime op: u4) InstrFn { }, 0x9 => { // NEG - cpu.r[rd] = sub(true, cpu, cpu.r[rs], cpu.r[rd]); // FIXME: I think this is wrong? + cpu.r[rd] = sub(true, cpu, 0, cpu.r[rs]); }, 0xA => { // CMP