def div_(self, global_state): op0, op1 = util.pop_bitvec(global_state.mstate), util.pop_bitvec(global_state.mstate) if op1 == 0: global_state.mstate.stack.append(BitVecVal(0, 256)) else: global_state.mstate.stack.append(UDiv(op0, op1)) return [global_state]
def choose_op(a1, a2, op): r = If(op == 0, a2 + a1, If(op == 1, a1 - a2, If(op == 2, a2 * a1, If(op == 3 and a2 != 0, UDiv(a1, a2), False ) ) ) ) return r
def div_(self, global_state): global_state.mstate.stack.append( UDiv(util.pop_bitvec(global_state.mstate), util.pop_bitvec(global_state.mstate))) return [global_state]
def operate_DIV(self, *values): if values[1] == 0: return 0 else: return hlp.get_concrete_int(UDiv(values[0] / values[1]))
def DIV(x, y): return If(y == 0, 0, UDiv(x, y))