add mulhdu random test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Aug 2021 16:12:58 +0000 (17:12 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Aug 2021 16:12:58 +0000 (17:12 +0100)
src/openpower/test/mul/mul_cases.py

index ad28da3df6b0b466a2296666693a5a43219c37cb..d1120aaf15885f46a5cf37ef244623b9f09b9eb5 100644 (file)
@@ -101,6 +101,16 @@ class MulTestCases2Arg(TestAccumulatorBase):
             initial_regs[2] = random.randint(0, (1 << 64)-1)
             self.add_case(Program(lst, bigendian), initial_regs)
 
+    def case_rand_mulhdu(self):
+        insns = ["mulhdu", "mulhdu."]
+        for i in range(40):
+            choice = random.choice(insns)
+            lst = [f"{choice} 3, 1, 2"]
+            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)
+
     def case_0_mullhw_regression(self):
         lst = [f"mulhwu 3, 1, 2"]
         initial_regs = [0] * 32