本文整理汇总了Python中miasm2.ir.ir.ir.get_next_label函数的典型用法代码示例。如果您正苦于以下问题:Python get_next_label函数的具体用法?Python get_next_label怎么用?Python get_next_label使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_next_label函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: call
def call(ir, instr, a):
e, a, dummy = mng_autoinc(a, None, 16)
n = ExprId(ir.get_next_label(instr), 16)
e.append(ExprAff(ExprMem(SP - ExprInt16(2), 16), n))
e.append(ExprAff(SP, SP - ExprInt16(2)))
e.append(ExprAff(PC, a))
e.append(ExprAff(ir.IRDst, a))
return e, []
示例2: add_condition_expr
def add_condition_expr(ir, instr, cond, instr_ir):
if cond == COND_AL:
return instr_ir, []
if not cond in tab_cond:
raise ValueError('unknown condition %r' % cond)
cond = tab_cond[cond]
lbl_next = ExprId(ir.get_next_label(instr), 32)
lbl_do = ExprId(ir.gen_label(), 32)
dst_cond = ExprCond(cond, lbl_do, lbl_next)
assert(isinstance(instr_ir, list))
has_irdst = False
for e in instr_ir:
if e.dst == ir.IRDst:
has_irdst = True
break
if not has_irdst:
instr_ir.append(ExprAff(ir.IRDst, lbl_next))
e_do = irbloc(lbl_do.name, [instr_ir])
e = [ExprAff(ir.IRDst, dst_cond)]
return e, [e_do]
示例3: cbnz
def cbnz(ir, instr, a, b):
e = []
lbl_next = ExprId(ir.get_next_label(instr), 32)
e.append(ir.IRDst, ExprCond(a, b, lbl_next))
return e
示例4: b_lt
def b_lt(arg1):
cond = cond2expr['LT']
dst = arg1 if cond else m2_expr.ExprId(ir.get_next_label(instr), 64)
PC = dst
ir.IRDst = dst
示例5: b_eq
def b_eq(arg1):
dst = arg1 if zf else m2_expr.ExprId(ir.get_next_label(instr), 64)
PC = dst
ir.IRDst = dst
示例6: b_ne
def b_ne(arg1):
dst = m2_expr.ExprId(ir.get_next_label(instr), 64) if zf else arg1
PC = dst
ir.IRDst = dst
示例7: tbnz
def tbnz(arg1, arg2, arg3):
bitmask = m2_expr.ExprInt(1, arg1.size) << arg2
dst = arg3 if arg1 & bitmask else m2_expr.ExprId(
ir.get_next_label(instr), 64)
PC = dst
ir.IRDst = dst
示例8: cbnz
def cbnz(arg1, arg2):
dst = arg2 if arg1 else m2_expr.ExprId(ir.get_next_label(instr), 64)
PC = dst
ir.IRDst = dst
示例9: cbz
def cbz(arg1, arg2):
dst = m2_expr.ExprId(ir.get_next_label(instr), 64) if arg1 else arg2
PC = dst
ir.IRDst = dst
示例10: jge
def jge(ir, instr, a):
n = ExprId(ir.get_next_label(instr), 16)
e = []
e.append(ExprAff(PC, ExprCond(nf ^ of, n, a)))
e.append(ExprAff(ir.IRDst, ExprCond(nf ^ of, n, a)))
return e, []
示例11: jc
def jc(ir, instr, a):
n = ExprId(ir.get_next_label(instr), 16)
e = []
e.append(ExprAff(PC, ExprCond(cf, a, n)))
e.append(ExprAff(ir.IRDst, ExprCond(cf, a, n)))
return e, []
示例12: tbz
def tbz(arg1, arg2, arg3):
bitmask = m2_expr.ExprInt_from(arg1, 1) << arg2
dst = m2_expr.ExprId(
ir.get_next_label(instr), 64) if arg1 & bitmask else arg3
PC = dst
ir.IRDst = dst