From: Luke Kenneth Casson Leighton Date: Thu, 27 Aug 2020 17:20:29 +0000 (+0100) Subject: augment addme test case to show bug #476 X-Git-Tag: semi_working_ecp5~250^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b467b06315fc3ef773c7f4bfcaf2494fcab9644a;p=soc.git augment addme test case to show bug #476 https://bugs.libre-soc.org/show_bug.cgi?id=476 --- diff --git a/src/soc/fu/alu/test/test_pipe_caller.py b/src/soc/fu/alu/test/test_pipe_caller.py index 15e33280..9434e504 100644 --- a/src/soc/fu/alu/test/test_pipe_caller.py +++ b/src/soc/fu/alu/test/test_pipe_caller.py @@ -103,31 +103,31 @@ class ALUTestCase(TestAccumulatorBase): insns = ["addme", "addme.", "addmeo", "addmeo."] for choice in insns: lst = [f"{choice} 6, 16"] - initial_regs = [0] * 32 - initial_regs[16] = 0x7ffffffff - initial_sprs = {} - xer = SelectableInt(0, 64) - xer[XER_bits['CA']] = 0 - initial_sprs[special_sprs['XER']] = xer - self.add_case(Program(lst, bigendian), - initial_regs, initial_sprs) - - self.add_case(Program(lst, bigendian), initial_regs) + for value in [0x7ffffffff, + 0xffff80000]: + initial_regs = [0] * 32 + initial_regs[16] = value + initial_sprs = {} + xer = SelectableInt(0, 64) + xer[XER_bits['CA']] = 0 + initial_sprs[special_sprs['XER']] = xer + self.add_case(Program(lst, bigendian), + initial_regs, initial_sprs) def case_addme_ca_1(self): insns = ["addme", "addme.", "addmeo", "addmeo."] for choice in insns: lst = [f"{choice} 6, 16"] - initial_regs = [0] * 32 - initial_regs[16] = 0x7ffffffff - initial_sprs = {} - xer = SelectableInt(0, 64) - xer[XER_bits['CA']] = 1 - initial_sprs[special_sprs['XER']] = xer - self.add_case(Program(lst, bigendian), - initial_regs, initial_sprs) - - self.add_case(Program(lst, bigendian), initial_regs) + for value in [0x7ffffffff, # fails, bug #476 + 0xffff80000]: + initial_regs = [0] * 32 + initial_regs[16] = value + initial_sprs = {} + xer = SelectableInt(0, 64) + xer[XER_bits['CA']] = 1 + initial_sprs[special_sprs['XER']] = xer + self.add_case(Program(lst, bigendian), + initial_regs, initial_sprs) def case_addze(self): insns = ["addze", "addze.", "addzeo", "addzeo."]