How to use the reil.arm64.operand.get function in reil

To help you get started, we’ve selected a few reil examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github c01db33f / reil / arm64 / control_flow.py View on Github external
def arm64_b(ctx, i):
    a = operand.get(ctx, i, 0)
    cond = conditional.condition(ctx, i.cc)
    ctx.emit(  jcc_  (cond, a))
github c01db33f / reil / arm64 / arithmetic.py View on Github external
def arm64_sub(ctx, i):
    if len(i.operands) == 3:
        dst_idx = 0
        a_idx = 1
        b_idx = 2
    else:
        dst_idx = 0
        a_idx = 0
        b_idx = 1

    a = operand.get(ctx, i, a_idx)
    b = operand.get(ctx, i, b_idx, a.size)

    result = ctx.tmp(a.size * 2)

    ctx.emit(  sub_  (a, b, result))

    if i.update_flags:
        _sub_set_flags(ctx, a, b, result)

    operand.set(ctx, i, dst_idx, result)
github c01db33f / reil / arm64 / arithmetic.py View on Github external
def arm64_sub(ctx, i):
    if len(i.operands) == 3:
        dst_idx = 0
        a_idx = 1
        b_idx = 2
    else:
        dst_idx = 0
        a_idx = 0
        b_idx = 1

    a = operand.get(ctx, i, a_idx)
    b = operand.get(ctx, i, b_idx, a.size)

    result = ctx.tmp(a.size * 2)

    ctx.emit(  sub_  (a, b, result))

    if i.update_flags:
        _sub_set_flags(ctx, a, b, result)

    operand.set(ctx, i, dst_idx, result)