From 8d86fe3062c3df4d7a833bd008025f714b4761d4 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 23 Dec 2021 12:40:56 +0000 Subject: [PATCH] add load-store byte-reverse 64-bit unit test (ldbrx/stdbrx) --- src/openpower/test/ldst/ldst_cases.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/openpower/test/ldst/ldst_cases.py b/src/openpower/test/ldst/ldst_cases.py index afa16e1d..136c53e0 100644 --- a/src/openpower/test/ldst/ldst_cases.py +++ b/src/openpower/test/ldst/ldst_cases.py @@ -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) + -- 2.30.2