add more totally random bpermd unit tests, just to be sure
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 18 May 2021 12:22:01 +0000 (13:22 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 18 May 2021 12:22:01 +0000 (13:22 +0100)
src/openpower/test/logical/logical_cases.py

index 33b77cc91df26f65748719cff67f97dd254e4ebf..892176e4adc20d94abe53a36bfae71ba659e18e7 100644 (file)
@@ -118,3 +118,11 @@ class LogicalTestCase(TestAccumulatorBase):
             initial_regs[2] = 0xdeadbeefcafec0de
             self.add_case(Program(lst, bigendian), initial_regs)
 
+    def case_bpermd_morerandom(self):
+        lst = ["bpermd 3, 1, 2"]
+        for i in range(100):
+            initial_regs = [0] * 32
+            initial_regs[1] = random.randint(0, (1<<64)-1)
+            initial_regs[2] = random.randint(0, (1<<64)-1)
+            self.add_case(Program(lst, bigendian), initial_regs)
+