add load-store byte-reverse 64-bit unit test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 23 Dec 2021 12:40:56 +0000 (12:40 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 23 Dec 2021 12:40:59 +0000 (12:40 +0000)
(ldbrx/stdbrx)

src/openpower/test/ldst/ldst_cases.py

index afa16e1deaee6289364c658fd8c064a0b535e3f0..136c53e00a3a61e7be012502ec21a0eef18059a9 100644 (file)
@@ -212,3 +212,17 @@ class LDSTTestCase(TestAccumulatorBase):
         self.add_case(Program(lst, bigendian), initial_regs,
                              initial_mem=initial_mem)
 
+    def case_11_load_store_dword_rev_ext(self):
+        lst = ["stdbrx 1, 4, 2",
+               "ldbrx 3, 4, 2"]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0x5678
+        initial_regs[2] = 0x0010
+        initial_regs[4] = 0x0008
+        initial_mem = {0x0000: (0x5432123412345678, 8),
+                       0x0008: (0xabcdef0187654321, 8),
+                       0x0020: (0x1828384822324252, 8),
+                        }
+        self.add_case(Program(lst, bigendian), initial_regs,
+                             initial_mem=initial_mem)
+