From f3b4db25993b9be457c0c0b87d2bfea78a83a247 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 27 Aug 2020 20:52:58 +0100 Subject: [PATCH] xer so is not being passed through to CR0 --- src/soc/fu/alu/test/test_pipe_caller.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/soc/fu/alu/test/test_pipe_caller.py b/src/soc/fu/alu/test/test_pipe_caller.py index 9434e504..60a1343f 100644 --- a/src/soc/fu/alu/test/test_pipe_caller.py +++ b/src/soc/fu/alu/test/test_pipe_caller.py @@ -129,6 +129,20 @@ class ALUTestCase(TestAccumulatorBase): self.add_case(Program(lst, bigendian), initial_regs, initial_sprs) + def case_addme_ca_so_3(self): + """bug where SO does not get passed through to CR0 + """ + lst = ["addme. 6, 16"] + initial_regs = [0] * 32 + initial_regs[16] = 0x7ffffffff + initial_sprs = {} + xer = SelectableInt(0, 64) + xer[XER_bits['CA']] = 1 + xer[XER_bits['SO']] = 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."] for choice in insns: -- 2.30.2