self.assertEqual(sim.gpr(1), SelectableInt(0x1234, 64))
self.assertEqual(sim.gpr(2), SelectableInt(0, 64))
-
-
+ def test_mfcr(self):
+ lst = ["mfcr 1"]
+ with Program(lst) as program:
+ sim = self.run_tst_program(program)
+ self.assertEqual(sim.gpr(1), SelectableInt(0, 64))
def test_mtcrf(self):
for i in range(4):
args = tmp
res = copy(args[0])
for i in args[1:]:
+ if isinstance(i, FieldSelectableInt):
+ i = i.si
assert isinstance(i, SelectableInt), "can only concat SIs, sorry"
res.bits += i.bits
res.value = (res.value << i.bits) | i.value