From: Luke Kenneth Casson Leighton Date: Thu, 27 Aug 2020 19:52:58 +0000 (+0100) Subject: xer so is not being passed through to CR0 X-Git-Tag: semi_working_ecp5~250^2~1 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f3b4db25993b9be457c0c0b87d2bfea78a83a247;p=soc.git xer so is not being passed through to CR0 --- 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: