diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2015-11-09 14:27:28 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2015-11-09 14:27:28 +0100 |
| commit | 82009afe2e94a4e9a6ac6200969936cb3285ec63 (patch) | |
| tree | 124e8be31ae9bb923221bc79269be01e1d92f6f0 | |
| parent | 29a00f31d46e49333df450b85580af152aae2668 (diff) | |
| parent | dcfdeae898b6c812107bc8384428a698a13a0b19 (diff) | |
| download | miasm-82009afe2e94a4e9a6ac6200969936cb3285ec63.tar.gz miasm-82009afe2e94a4e9a6ac6200969936cb3285ec63.zip | |
Merge pull request #259 from commial/fix-aflag
x86/sem: unify the way aflag is computed (like popfd/w, sahf)
| -rw-r--r-- | miasm2/arch/x86/sem.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index e511a534..1a4d7168 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -73,11 +73,8 @@ def update_flag_pf(a): a & m2_expr.ExprInt_from(a, 0xFF)))] -def update_flag_af(a): - return [m2_expr.ExprAff(af, - m2_expr.ExprCond((a & m2_expr.ExprInt_from(a,0x10)), - m2_expr.ExprInt_from(af, 1), - m2_expr.ExprInt_from(af, 0)))] +def update_flag_af(expr): + return [m2_expr.ExprAff(af, expr[4:5])] def update_flag_znp(a): |