def match_type(a,b): """Match operand type against operand type rule""" b = (b.type, b.sign, b.size, b.source, b.indirection) #print a,b for aa,bb in zip(a,b): if not bb in wraplist(aa): return False return True
def match_type(a, b): """Match operand type against operand type rule""" b = (b.type, b.sign, b.size, b.source, b.indirection) #print a,b for aa, bb in zip(a, b): if not bb in wraplist(aa): return False return True
def f_oreg(width=32): return (OP_TYPE_FLOAT, OP_SIGN_NONE, width, [_regw[x] for x in wraplist(width)] + [_regwo[x] for x in wraplist(width)], OP_INDIRECTION_NONE)
def i_oreg(sign, width=[16,32]): return (OP_TYPE_INT, sign, width, [_regw[x] for x in wraplist(width)] + [_regwo[x] for x in wraplist(width)], OP_INDIRECTION_NONE)
def psize_sign(x): return [(BF_PSIZE_SIGN, y, IS_SIGNED) for y in wraplist(x)]
def psize_width_s(x): return [(BF_OPER1_H, y, IS_32BIT) for y in wraplist(x)]
def psize_width(x): return [(BF_PSIZE_WIDTH, y, IS_32BIT) for y in wraplist(x)]