From 6e7d5f83b315d05f5a9362f54368b005376775f7 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Thu, 3 Sep 2020 20:24:09 -0700 Subject: [PATCH] fix addex --- src/instr_models.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/instr_models.rs b/src/instr_models.rs index 9ee3996..4de58fe 100644 --- a/src/instr_models.rs +++ b/src/instr_models.rs @@ -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() }) } -- 2.30.2