From f0d44c0fbd77425385aef26b51b88af574102f6d Mon Sep 17 00:00:00 2001 From: R Veera Kumar Date: Fri, 26 Nov 2021 08:39:56 +0530 Subject: [PATCH] Shorten expected state code for case_extsb in alu_cases unit test --- src/openpower/test/alu/alu_cases.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/openpower/test/alu/alu_cases.py b/src/openpower/test/alu/alu_cases.py index 4ece2cd8..5360f009 100644 --- a/src/openpower/test/alu/alu_cases.py +++ b/src/openpower/test/alu/alu_cases.py @@ -504,24 +504,21 @@ class ALUTestCase(TestAccumulatorBase): e.intregs[1] = initial_regs[1] if choice == "extsb": s = ((initial_regs[1] & 0x1000_0000_0000_0080)>>7)&0x1 + value = 0 if s == 1: value = 0xffff_ffff_ffff_ff<<8 - else: - value = 0x0 e.intregs[3] = value | (initial_regs[1] & 0xff) elif choice == "extsh": s = ((initial_regs[1] & 0x1000_0000_0000_8000)>>15)&0x1 + value = 0 if s == 1: value = 0xffff_ffff_ffff<<16 - else: - value = 0x0 e.intregs[3] = value | (initial_regs[1] & 0xffff) else: s = ((initial_regs[1] & 0x1000_0000_8000_0000)>>31)&0x1 + value = 0 if s == 1: value = 0xffff_ffff<<32 - else: - value = 0x0 e.intregs[3] = value | (initial_regs[1] & 0xffff_ffff) self.add_case(Program(lst, bigendian), initial_regs, expected=e) -- 2.30.2