From: Luke Kenneth Casson Leighton Date: Sat, 5 Sep 2020 15:38:40 +0000 (+0100) Subject: add lwzcix unit test X-Git-Tag: semi_working_ecp5~189 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e29393d63fea62ea2a2d7de9307fea2d36e36497;p=soc.git add lwzcix unit test --- 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) +