cpu: arm: Fix alu_add_update_carry function

Woopsie


Former-commit-id: 2da74e4bfd4b59a2885519a99f4b2c3d83031ee2
This commit is contained in:
Michel Heily 2019-07-01 19:25:42 +03:00
parent 2081b70ee2
commit 70179984d0

View file

@ -131,7 +131,7 @@ impl Core {
} }
fn alu_add_update_carry(a: i32, b: i32, carry: &mut bool) -> i32 { fn alu_add_update_carry(a: i32, b: i32, carry: &mut bool) -> i32 {
let res = a.wrapping_sub(b); let res = a.wrapping_add(b);
*carry = res < a; *carry = res < a;
res res
} }