diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2015-02-20 22:52:16 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2015-02-20 22:52:16 +0100 |
| commit | 1db45ff969a41d0576cf00f00f7b59e1bb332de2 (patch) | |
| tree | a062d34aacc6e6f3692cb6b92567a29081500d93 /miasm2/arch/x86/sem.py | |
| parent | f1966ac767894b4fe954613d2134f87cdc3697ca (diff) | |
| parent | c37fd6a238c617d1ca9a29871a229a64ba14b41e (diff) | |
| download | miasm-1db45ff969a41d0576cf00f00f7b59e1bb332de2.tar.gz miasm-1db45ff969a41d0576cf00f00f7b59e1bb332de2.zip | |
Merge pull request #81 from ggqb/master
x86 fix for PUSHFW / POPFW instructions
Diffstat (limited to 'miasm2/arch/x86/sem.py')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 928554cb..52cec344 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -970,7 +970,7 @@ def popfd(ir, instr): def popfw(ir, instr): - tmp = m2_expr.ExprMem(esp) + tmp = m2_expr.ExprMem(mRSP[instr.mode]) e = [] e.append(m2_expr.ExprAff(cf, m2_expr.ExprSlice(tmp, 0, 1))) e.append(m2_expr.ExprAff(pf, m2_expr.ExprSlice(tmp, 2, 3))) @@ -983,7 +983,7 @@ def popfw(ir, instr): e.append(m2_expr.ExprAff(of, m2_expr.ExprSlice(tmp, 11, 12))) e.append(m2_expr.ExprAff(iopl, m2_expr.ExprSlice(tmp, 12, 14))) e.append(m2_expr.ExprAff(nt, m2_expr.ExprSlice(tmp, 14, 15))) - e.append(m2_expr.ExprAff(esp, esp + m2_expr.ExprInt32(2))) + e.append(m2_expr.ExprAff(mRSP[instr.mode], mRSP[instr.mode] + m2_expr.ExprInt_fromsize(mRSP[instr.mode].size, 2))) return e, [] |