X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fsoc%2Fdecoder%2Fisa%2Ftest_caller.py;fp=src%2Fsoc%2Fdecoder%2Fisa%2Ftest_caller.py;h=0a26c8169883112d431b55828535038066e56633;hb=cd4cbabf64842fbdb3a276ba8134b9dcd43da4c8;hp=55dcc673bf08189ee50d154583709958c77a38c3;hpb=20a806229de8510e2455a31deec8f66592d61462;p=soc.git diff --git a/src/soc/decoder/isa/test_caller.py b/src/soc/decoder/isa/test_caller.py index 55dcc673..0a26c816 100644 --- a/src/soc/decoder/isa/test_caller.py +++ b/src/soc/decoder/isa/test_caller.py @@ -79,6 +79,16 @@ class DecoderTestCase(FHDLTestCase): print(sim.gpr(1)) self.assertEqual(sim.gpr(3), SelectableInt(0x1234, 64)) + def test_addpcis(self): + lst = ["addpcis 1, 0x1", + "addpcis 2, 0x1", + "addpcis 3, 0x1"] + with Program(lst) as program: + sim = self.run_tst_program(program) + self.assertEqual(sim.gpr(1), SelectableInt(0x10004, 64)) + self.assertEqual(sim.gpr(2), SelectableInt(0x10008, 64)) + self.assertEqual(sim.gpr(3), SelectableInt(0x1000c, 64)) + def run_tst_program(self, prog, initial_regs=[0] * 32): simulator = self.run_tst(prog, initial_regs) simulator.gpr.dump()