sim = self.run_tst_program(program, initial_regs)
self.assertEqual(sim.gpr(3), SelectableInt(0xdf95fd81bc0, 64))
+ def test_prty(self):
+ lst = ["prtyw 2, 1"]
+ initial_regs = [0] * 32
+ initial_regs[1] = 0xdeadbeeecaffc0de
+ with Program(lst) as program:
+ sim = self.run_tst_program(program, initial_regs)
+ self.assertEqual(sim.gpr(2), SelectableInt(0x100000001, 64))
+
+
+
def test_mtcrf(self):
for i in range(4):
# 0x76540000 gives expected (3+4) (2+4) (1+4) (0+4) for
assert b.bits == self.bits
return SelectableInt(self.value ^ b.value, self.bits)
+ def __rxor__(self, b):
+ b = check_extsign(self, b)
+ assert b.bits == self.bits
+ return SelectableInt(self.value ^ b.value, self.bits)
+
def __invert__(self):
return SelectableInt(~self.value, self.bits)