################################################################################ # # By choice, Miasm2 does not handle comparaison as a single operation, but with # operations corresponding to comparaison computation. # One may want to detect those comparaison; this library is designed to add them # in Miasm2 engine thanks to : # - Conditions computation in ExprOp # - Simplifications to catch known condition forms # # Conditions currently supported : # > (arg1.size - 1) == 1: val1 = - ((int(arg1.mask) ^ val1) + 1) val2 = int(arg2) if val2 >> (arg2.size - 1) == 1: val2 = - ((int(arg2.mask) ^ val2) + 1) return m2_expr.ExprInt(1, 1) if (val1 < val2) else m2_expr.ExprInt(0, 1) def exec_inf_signed(expr_simp, e): "Compute x