Add expected state to case_addme_ca_so_3 in alu_cases unit test
authorR Veera Kumar <vklr@vkten.in>
Mon, 22 Nov 2021 02:18:06 +0000 (07:48 +0530)
committerR Veera Kumar <vklr@vkten.in>
Mon, 22 Nov 2021 02:18:06 +0000 (07:48 +0530)
src/openpower/test/alu/alu_cases.py

index e935362207c781340bc1a2e38bd0ea44601baeea..71e45c2fc27c91a0586ddf2eb1b0956468dcfe5b 100644 (file)
@@ -159,8 +159,14 @@ class ALUTestCase(TestAccumulatorBase):
         xer[XER_bits['CA']] = 1
         xer[XER_bits['SO']] = 1
         initial_sprs[special_sprs['XER']] = xer
+        e = ExpectedState(pc=4)
+        e.intregs[16] = 0x7ffffffff
+        e.intregs[6] = 0x7ffffffff
+        e.crregs[0] = 0x5
+        e.so = 0x1
+        e.ca = 0x3
         self.add_case(Program(lst, bigendian),
-                      initial_regs, initial_sprs)
+                      initial_regs, initial_sprs, expected=e)
 
     def case_addze(self):
         insns = ["addze", "addze.", "addzeo", "addzeo."]