fix addex
authorJacob Lifshay <programmerjake@gmail.com>
Fri, 4 Sep 2020 03:24:09 +0000 (20:24 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Fri, 4 Sep 2020 03:25:17 +0000 (20:25 -0700)
src/instr_models.rs

index 9ee39969dba220a0b6016d62242350669e698213..4de58fe5e7250cd2a8221621799a7b649ea09783 100644 (file)
@@ -274,14 +274,12 @@ pub fn addex(inputs: InstructionInput) -> InstructionResult {
     let carry32 = u32::try_from(result32_u128).is_err();
     Ok(InstructionOutput {
         rt: Some(result),
-        overflow: Some(propagate_so(
-            OverflowFlags {
-                so,
-                ov: carry,
-                ov32: carry32,
-            },
-            inputs,
-        )?),
+        // doesn't change `so` on purpose
+        overflow: Some(OverflowFlags {
+            so,
+            ov: carry,
+            ov32: carry32,
+        }),
         ..InstructionOutput::default()
     })
 }