fix(cpu): properly negate in NEG

This commit is contained in:
Rekai Nyangadzayi Musuka 2022-02-02 20:12:20 -04:00
parent 9fd03d2a92
commit 8b574efe85
1 changed files with 1 additions and 1 deletions

View File

@ -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