Add expected state to case_addme_ca_so_4 in alu_cases unit test
authorR Veera Kumar <vklr@vkten.in>
Mon, 22 Nov 2021 02:34:26 +0000 (08:04 +0530)
committerR Veera Kumar <vklr@vkten.in>
Mon, 22 Nov 2021 02:34:26 +0000 (08:04 +0530)
src/openpower/test/alu/alu_cases.py

index 71e45c2fc27c91a0586ddf2eb1b0956468dcfe5b..bcf34a0f3904e873844d2c94f94420ad80a68f0e 100644 (file)
@@ -145,8 +145,13 @@ class ALUTestCase(TestAccumulatorBase):
         xer = SelectableInt(0, 64)
         xer[XER_bits['CA']] = 1
         initial_sprs[special_sprs['XER']] = xer
+        e = ExpectedState(pc=4)
+        e.intregs[16] = 0x7fffffffffffffff
+        e.intregs[6] = 0x7fffffffffffffff
+        e.ca = 0x3
+        e.crregs[0] = 0x4
         self.add_case(Program(lst, bigendian),
-                      initial_regs, initial_sprs)
+                      initial_regs, initial_sprs, expected=e)
 
     def case_addme_ca_so_3(self):
         """bug where SO does not get passed through to CR0