From cc1c683134e57ee8510207d41e71e1834066b516 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 22 Aug 2020 12:24:29 +0100 Subject: [PATCH] add regression test for nonzero addis --- src/soc/fu/alu/test/test_pipe_caller.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/soc/fu/alu/test/test_pipe_caller.py b/src/soc/fu/alu/test/test_pipe_caller.py index c8d23a35..4e55dadc 100644 --- a/src/soc/fu/alu/test/test_pipe_caller.py +++ b/src/soc/fu/alu/test/test_pipe_caller.py @@ -99,6 +99,13 @@ class ALUTestCase(TestAccumulatorBase): initial_regs[2] = random.randint(0, (1 << 64)-1) self.add_case(Program(lst, bigendian), initial_regs) + def case_addis_nonzero_r0_regression(self): + lst = [f"addis 3, 0, 1"] + print(lst) + initial_regs = [0] * 32 + initial_regs[0] = 5 + self.add_case(Program(lst, bigendian), initial_regs) + def case_addis_nonzero_r0(self): for i in range(10): imm = random.randint(-(1 << 15), (1 << 15)-1) -- 2.30.2