def i_bswap(self, op): val = self.getOperValue(op, 0) tsize = op.opers[0].tsize self.setOperValue(op, 0, e_bits.byteswap(val, tsize))
def test_byteswap(self): self.assertEqual(0x12345678, e_bits.byteswap(0x78563412, 4))