xer so is not being passed through to CR0
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Aug 2020 19:52:58 +0000 (20:52 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 Aug 2020 19:52:58 +0000 (20:52 +0100)
src/soc/fu/alu/test/test_pipe_caller.py

index 9434e504abcaa3afb006cf36e90f61fb9dc06e66..60a1343fea45c571db5c1af59d3ee9714816ffad 100644 (file)
@@ -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: