add single regression test for bc_ctr in branch cases
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 30 Apr 2021 16:59:20 +0000 (17:59 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 30 Apr 2021 16:59:20 +0000 (17:59 +0100)
src/openpower/test/branch/branch_cases.py

index 40a2452a9e351f958053ee7a9d980409e6fdf1fa..dac8023e8fc94147e253bcd83fd633cccab6cf87 100644 (file)
@@ -48,6 +48,18 @@ class BranchTestCase(TestAccumulatorBase):
                           initial_sprs=initial_sprs,
                           initial_cr=cr)
 
+    def case_bc_ctr_regression(self):
+        bc = 13116
+        bo = 8
+        bi = 6
+        cr = 0x100983
+        ctr = 0x420abd56
+        lst = [f"bc {bo}, {bi}, {bc}"]
+        initial_sprs = {9: SelectableInt(ctr, 64)}
+        self.add_case(Program(lst, bigendian),
+                      initial_sprs=initial_sprs,
+                      initial_cr=cr)
+
     def case_bc_reg(self):
         # XXX: bcctr and bcctrl time out (irony: they're counters)
         choices = ["bclr", "bclrl", "bcctr", "bcctrl", "bctar", "bctarl"]