Add unit test replicating failing proof case
authorSamuel A. Falvo II <kc5tja@arrl.net>
Sat, 5 Sep 2020 00:23:06 +0000 (17:23 -0700)
committerSamuel A. Falvo II <kc5tja@arrl.net>
Sat, 5 Sep 2020 00:23:06 +0000 (17:23 -0700)
src/soc/fu/shift_rot/test/test_pipe_caller.py

index 1fc4ca1afd7c667b85a853dc4a195ad8aefbe0d3..d1760bcd93df22637eeb7eb05c6928aa6d99aead 100644 (file)
@@ -133,6 +133,14 @@ class ShiftRotTestCase(TestAccumulatorBase):
         initial_regs[4] = 64 # too big, output should be zero
         self.add_case(Program(lst, bigendian), initial_regs)
 
+    def case_sld_rb_is_zero(self):
+        lst = ["sld 3, 1, 4",
+               ]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0x8000000000000000
+        initial_regs[4] = 0 # no shift; output should equal input
+        self.add_case(Program(lst, bigendian), initial_regs)
+
     def case_shift_once(self):
         lst = ["slw 3, 1, 4",
                "slw 3, 1, 2"]