Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def x86_loope(ctx, i):
c = conditional.condition(ctx, conditional.E)
dst = operand.get(ctx, i, 0)
tmp0 = ctx.tmp(8)
ctx.emit( sub_ (ctx.counter, imm(1, ctx.counter.size), ctx.counter))
ctx.emit( equ_ (ctx.counter, imm(0, ctx.counter.size), tmp0))
ctx.emit( or_ (c, tmp0, c))
ctx.emit( jcc_ (c, dst))
def x86_loopne(ctx, i):
c = conditional.condition(ctx, conditional.NE)
dst = operand.get(ctx, i, 0)
tmp0 = ctx.tmp(8)
ctx.emit( sub_ (ctx.counter, imm(1, ctx.counter.size), ctx.counter))
ctx.emit( equ_ (ctx.counter, imm(0, ctx.counter.size), tmp0))
ctx.emit( or_ (c, tmp0, c))
ctx.emit( jcc_ (c, dst))