From ad17c7baf8a8626543bae74304375bedf20c548c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 18 Oct 2023 21:21:48 +0100 Subject: [PATCH] add sc test to TestTrapCases --- src/openpower/test/trap/trap_cases.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openpower/test/trap/trap_cases.py b/src/openpower/test/trap/trap_cases.py index 1501b8ab..704102d2 100644 --- a/src/openpower/test/trap/trap_cases.py +++ b/src/openpower/test/trap/trap_cases.py @@ -51,6 +51,16 @@ class TrapTestCase(TestAccumulatorBase): self.add_case(Program(lst, bigendian), initial_regs, initial_sprs) + def case_1_sc(self): + lst = ["sc 0"] + initial_regs = [0] * 32 + initial_regs[1] = 1 + initial_sprs = {'SRR0': 0x12345678, 'SRR1': 0x5678} + e = ExpectedState(pc=0xc00) + e.intregs[1] = 1 + self.add_case(Program(lst, bigendian), + initial_regs, initial_sprs) + def case_1_rfid(self): lst = ["rfid"] initial_regs = [0] * 32 -- 2.30.2