Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _arm_mov(ctx, i):
prev_value = operand.get(ctx, i, 1)
value = ctx.tmp(ctx.word_size)
ctx.emit( str_ (prev_value, value))
if i.update_flags:
set_N(ctx, value)
set_Z(ctx, value)
operand.set(ctx, i, 0, value)
ctx.emit( and_ (prev_value, imm(mask(16), 32), value))
# then compute the high 16 bits
prev_result = operand.get(ctx, i, 1)
result = ctx.tmp(ctx.word_size)
ctx.emit( str_ (prev_result, result))
ctx.emit( lshl_ (result, imm(16, 32), result))
ctx.emit( or_ (value, result, result))
if i.update_flags:
set_N(ctx, result)
set_Z(ctx, result)
operand.set(ctx, i, 0, result)
def arm_str(ctx, i):
value = operand.get(ctx, i, 1)
operand.set(ctx, i, 0, value)