From 620e5f73d03ff45cc1e05b1844b9a3921ad0d6a1 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Wed, 27 May 2020 23:33:32 -0700 Subject: [PATCH] working on instruction model --- src/instr_models.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/instr_models.rs b/src/instr_models.rs index 0890f45..0c6c76a 100644 --- a/src/instr_models.rs +++ b/src/instr_models.rs @@ -135,10 +135,11 @@ pub fn divweuo(inputs: TestDivInput) -> TestDivResult { let resultu64 = dividend / divisor; if resultu64 > u64::from(u32::max_value()) { result = 0; + overflow = true; } else { result = resultu64 as u32 as u64; + overflow = false; } - overflow = false; } TestDivResult { result, -- 2.30.2