Skip to content

Commit

Permalink
Remove single-op form of _bitwise_instruction
Browse files Browse the repository at this point in the history
It's never used
  • Loading branch information
Eric Hennenfent committed Apr 6, 2020
1 parent 9ade0d2 commit 1b7a411
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions manticore/native/cpu/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1510,13 +1510,9 @@ def STMDA(cpu, base, *regs):
def STMDB(cpu, base, *regs):
cpu._STM(cs.arm.ARM_INS_STMDB, base, regs)

def _bitwise_instruction(cpu, operation, dest, op1, op2=None):
if op2:
op2_val, carry = op2.read(with_carry=True)
result = operation(op1.read(), op2_val)
else:
op1_val, carry = op1.read(with_carry=True)
result = operation(op1_val)
def _bitwise_instruction(cpu, operation, dest, op1, op2):
op2_val, carry = op2.read(with_carry=True)
result = operation(op1.read(), op2_val)
if dest is not None:
dest.write(result)
cpu.set_flags(C=carry, N=HighBit(result), Z=(result == 0))
Expand Down

0 comments on commit 1b7a411

Please sign in to comment.