Add expected state to case_cmpeqb in alu_cases unit test
authorR Veera Kumar <vklr@vkten.in>
Mon, 22 Nov 2021 10:24:08 +0000 (15:54 +0530)
committerR Veera Kumar <vklr@vkten.in>
Mon, 22 Nov 2021 10:24:08 +0000 (15:54 +0530)
src/openpower/test/alu/alu_cases.py

index 3af7b046be38f65a6071a336e352c3946ae85cf7..4560c100949a94656688bd5c95c16640742b265d 100644 (file)
@@ -431,5 +431,14 @@ class ALUTestCase(TestAccumulatorBase):
             initial_regs = [0] * 32
             initial_regs[1] = i
             initial_regs[2] = 0x0001030507090b0f
-            self.add_case(Program(lst, bigendian), initial_regs, {})
+
+            e = ExpectedState(pc=4)
+            e.intregs[1] = i
+            e.intregs[2] = 0x1030507090b0f
+            matlst = [ 0x00, 0x01, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0f ]
+            for j in matlst:
+                if j == i:
+                    e.crregs[1] = 0x4
+
+            self.add_case(Program(lst, bigendian), initial_regs, expected=e)