From e29393d63fea62ea2a2d7de9307fea2d36e36497 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 5 Sep 2020 16:38:40 +0100 Subject: [PATCH] add lwzcix unit test --- src/soc/fu/ldst/test/test_pipe_caller.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/soc/fu/ldst/test/test_pipe_caller.py b/src/soc/fu/ldst/test/test_pipe_caller.py index 4e3627dd..3ede0023 100644 --- a/src/soc/fu/ldst/test/test_pipe_caller.py +++ b/src/soc/fu/ldst/test/test_pipe_caller.py @@ -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) + -- 2.30.2