diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-02-14 15:13:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-14 15:13:20 +0100 |
| commit | 9dd075f09e4f31ec7fe12e50709d9e58c65ed5f4 (patch) | |
| tree | 65d6c4f1c613822d0441bd296cc4c7e7f1136522 /miasm2/arch/x86/sem.py | |
| parent | dcfadb31685d428618b88f19fcc96dd70cecfc8f (diff) | |
| parent | 0f55f0779555c38cd907143527d4ddbf26c18157 (diff) | |
| download | miasm-9dd075f09e4f31ec7fe12e50709d9e58c65ed5f4.tar.gz miasm-9dd075f09e4f31ec7fe12e50709d9e58c65ed5f4.zip | |
Merge pull request #679 from commial/refactor-expr-comp
Refactor expr simplifications tests
Diffstat (limited to 'miasm2/arch/x86/sem.py')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 93c4910a..9f438b71 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -21,7 +21,6 @@ import miasm2.expression.expression as m2_expr from miasm2.expression.simplifications import expr_simp from miasm2.arch.x86.regs import * from miasm2.arch.x86.arch import mn_x86, repeat_mn, replace_regs -from miasm2.expression.expression_helper import expr_cmps, expr_cmpu from miasm2.ir.ir import IntermediateRepresentation, IRBlock, AssignBlock from miasm2.core.sembuilder import SemBuilder from miasm2.jitter.csts import EXCEPT_DIV_BY_ZERO, EXCEPT_ILLEGAL_INSN, \ @@ -2741,11 +2740,11 @@ def daa(_, instr): e = [] r_al = mRAX[instr.mode][:8] - cond1 = expr_cmpu(r_al[:4], m2_expr.ExprInt(0x9, 4)) | af + cond1 = m2_expr.expr_is_unsigned_greater(r_al[:4], m2_expr.ExprInt(0x9, 4)) | af e.append(m2_expr.ExprAff(af, cond1)) - cond2 = expr_cmpu(m2_expr.ExprInt(6, 8), r_al) - cond3 = expr_cmpu(r_al, m2_expr.ExprInt(0x99, 8)) | cf + cond2 = m2_expr.expr_is_unsigned_greater(m2_expr.ExprInt(6, 8), r_al) + cond3 = m2_expr.expr_is_unsigned_greater(r_al, m2_expr.ExprInt(0x99, 8)) | cf cf_c1 = m2_expr.ExprCond(cond1, cf | (cond2), @@ -2771,11 +2770,11 @@ def das(_, instr): e = [] r_al = mRAX[instr.mode][:8] - cond1 = expr_cmpu(r_al[:4], m2_expr.ExprInt(0x9, 4)) | af + cond1 = m2_expr.expr_is_unsigned_greater(r_al[:4], m2_expr.ExprInt(0x9, 4)) | af e.append(m2_expr.ExprAff(af, cond1)) - cond2 = expr_cmpu(m2_expr.ExprInt(6, 8), r_al) - cond3 = expr_cmpu(r_al, m2_expr.ExprInt(0x99, 8)) | cf + cond2 = m2_expr.expr_is_unsigned_greater(m2_expr.ExprInt(6, 8), r_al) + cond3 = m2_expr.expr_is_unsigned_greater(r_al, m2_expr.ExprInt(0x99, 8)) | cf cf_c1 = m2_expr.ExprCond(cond1, cf | (cond2), |