modsd bug, https://bugs.libre-soc.org/show_bug.cgi?id=471
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 22 Aug 2020 13:01:26 +0000 (14:01 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 22 Aug 2020 14:39:43 +0000 (15:39 +0100)
src/soc/fu/div/test/test_pipe_caller.py

index 34c54f372c1f8aadcac3017e6132c8a38d18498a..def5c77fcd00a458aef74e79e9fca3dc789d27a7 100644 (file)
@@ -12,6 +12,15 @@ from soc.fu.div.test.helper import (log_rand, get_cu_inputs,
 
 class DivTestCases(TestAccumulatorBase):
 
+    # modulo
+    def case_modsd_regression(self):
+        lst = [f"modsd 17, 27, 0"]
+        initial_regs = [0] * 32
+        initial_regs[0] = 0xff
+        initial_regs[27] = 0x7fffffffffffffff
+        with Program(lst, bigendian) as prog:
+            self.add_case(prog, initial_regs)
+
     def case_0_regression(self):
         for i in range(40):
             lst = ["divwo 3, 1, 2"]