add lwzcix unit test
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 5 Sep 2020 15:38:40 +0000 (16:38 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 5 Sep 2020 15:38:40 +0000 (16:38 +0100)
src/soc/fu/ldst/test/test_pipe_caller.py

index 4e3627dd0b81912dd3794e5535d56d97d9851a4f..3ede00234ae73ff811079af30408f4a3644a3589 100644 (file)
@@ -244,3 +244,17 @@ class LDSTTestCase(TestAccumulatorBase):
         self.add_case(Program(lst, bigendian), initial_regs,
                              initial_mem=initial_mem)
 
+    def case_10_load_store_cix(self):
+        lst = ["stwbrx 1, 4, 2",
+               "lwzcix 3, 4, 2"]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0x5678
+        initial_regs[2] = 0x001c
+        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)
+