diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2016-10-03 13:33:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-03 13:33:56 +0200 |
| commit | 664cd60430c535931e2a10c5fbe18235756fba0c (patch) | |
| tree | a90abf03c7495779b12549f0a6d7a443b5b96def /miasm2/expression/simplifications_cond.py | |
| parent | 9bc007e7350851d1d97e426f4d1ae369facdb721 (diff) | |
| parent | c86e781f38e4b3688392d726bdd6fcbc2e6d377b (diff) | |
| download | miasm-664cd60430c535931e2a10c5fbe18235756fba0c.tar.gz miasm-664cd60430c535931e2a10c5fbe18235756fba0c.zip | |
Merge pull request #430 from commial/feature/int_ExprInt
Feature/int expr int
Diffstat (limited to 'miasm2/expression/simplifications_cond.py')
| -rw-r--r-- | miasm2/expression/simplifications_cond.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/miasm2/expression/simplifications_cond.py b/miasm2/expression/simplifications_cond.py index a5acdba6..03bf6166 100644 --- a/miasm2/expression/simplifications_cond.py +++ b/miasm2/expression/simplifications_cond.py @@ -197,13 +197,13 @@ def __comp_signed(arg1, arg2): """Return ExprInt1(1) if arg1 <s arg2 else ExprInt1(0) @arg1, @arg2: ExprInt""" - val1 = int(arg1.arg) + val1 = int(arg1) if val1 >> (arg1.size - 1) == 1: - val1 = - ((int(arg1.mask.arg) ^ val1) + 1) + val1 = - ((int(arg1.mask) ^ val1) + 1) - val2 = int(arg2.arg) + val2 = int(arg2) if val2 >> (arg2.size - 1) == 1: - val2 = - ((int(arg2.mask.arg) ^ val2) + 1) + val2 = - ((int(arg2.mask) ^ val2) + 1) return m2_expr.ExprInt1(1) if (val1 < val2) else m2_expr.ExprInt1(0) |