From 9dba54dce3b24e0800c34c59121403972e1cf6cc Mon Sep 17 00:00:00 2001 From: R Veera Kumar Date: Thu, 25 Nov 2021 15:45:21 +0530 Subject: [PATCH] Shortened code in case_addis_nonzero_r0 alu test case --- src/openpower/test/alu/alu_cases.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/openpower/test/alu/alu_cases.py b/src/openpower/test/alu/alu_cases.py index 5cb07aed..ca68fd2e 100644 --- a/src/openpower/test/alu/alu_cases.py +++ b/src/openpower/test/alu/alu_cases.py @@ -237,10 +237,7 @@ class ALUTestCase(TestAccumulatorBase): initial_regs[0] = random.randint(0, (1 << 64)-1) e = ExpectedState(pc=4) e.intregs[0] = initial_regs[0] - if imm < 0: - e.intregs[3] = (imm + 2**48)<<16 - else: - e.intregs[3] = imm << 16 + e.intregs[3] = (imm << 16) & ((1<<64)-1) self.add_case(Program(lst, bigendian), initial_regs, expected=e) def case_rand_imm(self): -- 2.30.2