add extra divwo regression test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 9 Aug 2020 14:01:23 +0000 (15:01 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 9 Aug 2020 14:01:23 +0000 (15:01 +0100)
src/soc/fu/div/test/test_pipe_caller.py

index 55180261600b4593ff3543174a6126f2f2d9b9a3..558e576b5f2bc84a5a7e1d87f7af1981155f8eef 100644 (file)
@@ -101,6 +101,14 @@ class DivTestCases(TestAccumulatorBase):
         with Program(lst, bigendian) as prog:
             self.add_case(prog, initial_regs)
 
+    def case_10_regression(self):  # overflow fails
+        lst = ["divwo 3, 1, 2"]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0xbc716835f32ac00c
+        initial_regs[2] = 0xcdf69a7f7042db66
+        with Program(lst, bigendian) as prog:
+            self.add_case(prog, initial_regs)
+
     def case_divw_by_zero_1(self):
         lst = ["divw. 3, 1, 2"]
         initial_regs = [0] * 32