initial_sprs[special_sprs['XER']] = xer
self.run_tst_program(Program(lst), initial_regs, initial_sprs)
+ def test_cmp(self):
+ lst = ["cmp cr2, 1, 6, 7"]
+ initial_regs = [0] * 32
+ initial_regs[6] = random.randint(0, (1<<64)-1)
+ initial_regs[7] = random.randint(0, (1<<64)-1)
+ self.run_tst_program(Program(lst), initial_regs, {})
+
def test_ilang(self):
rec = CompALUOpSubset()
comb += [rotator.right_shift.eq(1),
rotator.clear_left.eq(0),
rotator.clear_right.eq(0)]
+ with m.Case(InternalOp.OP_RLC):
+ comb += [rotator.right_shift.eq(0),
+ rotator.clear_left.eq(1),
+ rotator.clear_right.eq(1)]