working on instruction model
authorJacob Lifshay <programmerjake@gmail.com>
Thu, 28 May 2020 06:33:32 +0000 (23:33 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 28 May 2020 06:33:32 +0000 (23:33 -0700)
src/instr_models.rs

index 0890f45f52e98fb8710c3f563fda0b5feed136d2..0c6c76a22649722091744d908d077a391ae3e82e 100644 (file)
@@ -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,