From fdeeb295ae18191d5702e7acd8f940a1aeb2977b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 5 Jul 2022 14:04:24 +0100 Subject: [PATCH] add regression test for completely borked value from mulhd https://bugs.libre-soc.org/show_bug.cgi?id=855 --- src/openpower/test/mul/mul_cases.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/openpower/test/mul/mul_cases.py b/src/openpower/test/mul/mul_cases.py index ea0b9974..7b751f92 100644 --- a/src/openpower/test/mul/mul_cases.py +++ b/src/openpower/test/mul/mul_cases.py @@ -1,11 +1,22 @@ from openpower.simulator.program import Program from openpower.endian import bigendian from openpower.test.common import TestAccumulatorBase, skip_case +from openpower.test.state import ExpectedState import random class MulTestCases2Arg(TestAccumulatorBase): + + def case_kestrel_regression_0(self): + lst = ["mulhd r30,r9,r30"] + initial_regs = [0] * 32 + initial_regs[30] = 0x20c49ba5e353f7cf + initial_regs[9] = 0x1f40 + e = ExpectedState(initial_regs, 4) + e.intregs[30] = 0x400 + self.add_case(Program(lst, bigendian), initial_regs, expected=e) + def case_0_mullw(self): lst = [f"mullw 3, 1, 2"] initial_regs = [0] * 32 -- 2.30.2