cpu: arm: Fix alu_add_update_carry function
Woopsie Former-commit-id: 2da74e4bfd4b59a2885519a99f4b2c3d83031ee2
This commit is contained in:
parent
2081b70ee2
commit
70179984d0
|
@ -131,7 +131,7 @@ impl Core {
|
|||
}
|
||||
|
||||
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;
|
||||
res
|
||||
}
|
||||
|
|
Reference in a new issue