Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
clear = True
if len(i.operands) == 1:
# source is the accumulator
value = ctx.accumulator
if i.operands[0].type == capstone.x86.X86_OP_REG:
clear = False
else:
value = operand.get(ctx, i, 1, size=size)
if (i.operands[0].type == capstone.x86.X86_OP_REG and
i.operands[1].type == capstone.x86.X86_OP_REG):
clear = False
# Oh x86 how I hate you
if i.operands[1].type == capstone.x86.X86_OP_MEM and operand.get_size(ctx, i, 1) != 32:
clear = False
operand.set(ctx, i, 0, value, clear=clear)
def x86_mov(ctx, i):
size = operand.get_size(ctx, i, 0)
value = None
clear = True
if len(i.operands) == 1:
# source is the accumulator
value = ctx.accumulator
if i.operands[0].type == capstone.x86.X86_OP_REG:
clear = False
else:
value = operand.get(ctx, i, 1, size=size)
if (i.operands[0].type == capstone.x86.X86_OP_REG and
i.operands[1].type == capstone.x86.X86_OP_REG):
clear = False