add sld test with RB=64 to see what happens
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 4 Sep 2020 23:48:23 +0000 (00:48 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 4 Sep 2020 23:48:23 +0000 (00:48 +0100)
src/soc/fu/shift_rot/test/test_pipe_caller.py

index 62297a7ea485fc36cd4866aabf3ffe09e75dfe06..1fc4ca1afd7c667b85a853dc4a195ad8aefbe0d3 100644 (file)
@@ -125,6 +125,14 @@ class ShiftRotTestCase(TestAccumulatorBase):
         print(initial_regs[1], initial_regs[2])
         self.add_case(Program(lst, bigendian), initial_regs)
 
+    def case_sld_rb_too_big(self):
+        lst = ["sld 3, 1, 4",
+               ]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0xffffffffffffffff
+        initial_regs[4] = 64 # too big, output should be zero
+        self.add_case(Program(lst, bigendian), initial_regs)
+
     def case_shift_once(self):
         lst = ["slw 3, 1, 4",
                "slw 3, 1, 2"]