diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-12-18 18:29:29 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-12-18 18:33:31 +0100 |
| commit | 06d2b033f9c3ba4fc0e68dc29f11f5badd0d78db (patch) | |
| tree | 21c7e2acddcf61333d094240d4eee73572d70e16 | |
| parent | eae166b6d703e9c394e1fd00e98328289192a12d (diff) | |
| download | miasm-06d2b033f9c3ba4fc0e68dc29f11f5badd0d78db.tar.gz miasm-06d2b033f9c3ba4fc0e68dc29f11f5badd0d78db.zip | |
Add CC_S>= simplification
| -rw-r--r-- | miasm/expression/simplifications_common.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/miasm/expression/simplifications_common.py b/miasm/expression/simplifications_common.py index 85af9dc4..68d98c00 100644 --- a/miasm/expression/simplifications_common.py +++ b/miasm/expression/simplifications_common.py @@ -853,6 +853,17 @@ def simp_cc_conds(_, expr): ExprInt(1, expr.size) ) + elif (expr.is_op("CC_S>=") and + len(expr.args) == 2 and + expr.args[0].is_op("FLAG_SIGN_SUB") and + expr.args[0].args[1].is_int(0) and + expr.args[1].is_int(0)): + expr = ExprOp( + TOK_INF_EQUAL_SIGNED, + expr.args[0].args[1], + expr.args[0].args[0], + ) + elif (expr.is_op("CC_S<") and test_cc_eq_args( expr, |