From: Luke Kenneth Casson Leighton Date: Wed, 18 Oct 2023 20:21:48 +0000 (+0100) Subject: add sc test to TestTrapCases X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2aedc23fa893142d55c77a8352f6044e132dc171;p=openpower-isa.git add sc test to TestTrapCases --- 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