fix expected state in hazard test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 1 Dec 2021 18:05:34 +0000 (18:05 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 1 Dec 2021 18:05:34 +0000 (18:05 +0000)
src/openpower/test/general/overlap_hazards.py

index 035b8cbc83e44ac2af7ff823ce422fa77950fccc..14ffdceda24928b6719f4198ad1560e770c22086 100644 (file)
@@ -144,7 +144,7 @@ class HazardTestCase(TestAccumulatorBase):
         instruction followed by a 1-operand.
         """
         lst = ["mullw 5, 7, 6", # r5 = 2*4       r5=8
-               "addi 1, 8, 2",  # r5 = 8+2       r5=10
+               "addi 1, 8, 2",  # r5 = 8+2       r5=2
                ]
         initial_regs = [0] * 32
         initial_regs[2] = 2
@@ -152,9 +152,10 @@ class HazardTestCase(TestAccumulatorBase):
         initial_regs[6] = 2
         initial_regs[7] = 4
         e = ExpectedState(pc=8)
+        e.intregs[1] = 2 # 2 + 0 = 2
         e.intregs[2] = 2
         e.intregs[3] = 4
-        e.intregs[5] = 10 # 4 plus 5 == 9
+        e.intregs[5] = 8 # 2*4 = 8
         e.intregs[6] = 2
         e.intregs[7] = 4
         self.add_case(Program(lst, bigendian), initial_regs, expected=e)