From 5e7b5ce86ded1f7686e4fa45538df0f0d7a5c5c2 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 30 Aug 2021 17:24:56 +0100 Subject: [PATCH] add short mulli random test --- src/openpower/test/mul/mul_cases.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/openpower/test/mul/mul_cases.py b/src/openpower/test/mul/mul_cases.py index d1120aaf..ea0b9974 100644 --- a/src/openpower/test/mul/mul_cases.py +++ b/src/openpower/test/mul/mul_cases.py @@ -91,6 +91,18 @@ class MulTestCases2Arg(TestAccumulatorBase): initial_regs[2] = random.randint(0, (1 << 64)-1) self.add_case(Program(lst, bigendian), initial_regs) + def case_mulli(self): + + for i in range(40): + imm = random.randint(-1 << 15, (1 << 15) - 1) + ra = random.randint(0, (1 << 64) - 1) + l = [f"mulli 0, 1, {imm}"] + # use "with" so as to close the files used + with Program(l, bigendian) as prog: + initial_regs = [0] * 32 + initial_regs[1] = ra + self.add_case(prog, initial_regs) + def case_rand_mulhd(self): insns = ["mulhd", "mulhd."] for i in range(40): -- 2.30.2