add TrapTestCase for KAIVB
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 26 Jun 2022 11:39:31 +0000 (12:39 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 26 Jun 2022 11:39:31 +0000 (12:39 +0100)
https://bugs.libre-soc.org/show_bug.cgi?id=859

src/openpower/test/trap/trap_cases.py

index 069b980dd32313ce474e11e3875a374ef463bf8a..41d343489540af84a2e433a205ac245059ee9df1 100644 (file)
@@ -9,6 +9,19 @@ import random
 
 class TrapTestCase(TestAccumulatorBase):
 
+    def case_1_kaivb(self):
+        lst = ["mtspr 850, 1",  # KAIVB
+               "mfspr 2, 850",
+               ]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0x129518230011feed
+        initial_sprs = {'KAIVB': 0x12345678,
+                        }
+        msr = 0xa000000000000003
+        self.add_case(Program(lst, bigendian),
+                      initial_regs, initial_sprs,
+                                    initial_msr=msr)
+
     def case_0_hrfid(self):
         lst = ["hrfid"]
         initial_regs = [0] * 32