def test_cmpw(): assert _b(ppc.cmpwi(ppc.r4, -1)) == [0x2c, 0x04, 0xFF, 0xFF]
def test_cmpwi_b(): assert list(ppc.cmpwi(ppc.r4, -1).bytes_for(0)) == [0x2c, 0x04, 0xFF, 0xFF]
def test_cmpwi_a(): assert _b(ppc.cmpwi(ppc.r30, 0)) == [0x2c, 0x1e, 0x00, 0x00]
def test_cmpwi_a(): assert list(ppc.cmpwi(ppc.r30, 0).bytes_for(0)) == [0x2c, 0x1e, 0x00, 0x00]