diff options
| author | Camille Mougey <commial@gmail.com> | 2015-02-27 15:57:58 +0100 |
|---|---|---|
| committer | Camille Mougey <commial@gmail.com> | 2015-02-27 15:57:58 +0100 |
| commit | 9c77eb1dd888201c439882a8c93a9e87e047fd0a (patch) | |
| tree | 0a0de39f6d692be062763b4c7fdcc1ae5da6ec75 /miasm2/arch/x86/sem.py | |
| parent | a225ef4cfec9d8a07884e2ac979e82e9db0e1b37 (diff) | |
| parent | 847e334dd981fc456f173b241eb018ccf7a0e82b (diff) | |
| download | miasm-9c77eb1dd888201c439882a8c93a9e87e047fd0a.tar.gz miasm-9c77eb1dd888201c439882a8c93a9e87e047fd0a.zip | |
Merge pull request #91 from serpilliere/fix_x86_stack_sem
Fix x86 stack sem
Diffstat (limited to 'miasm2/arch/x86/sem.py')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 50cb8f05..94066519 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -1137,14 +1137,13 @@ def retf(ir, instr, a=None): def leave(ir, instr): opmode, admode = instr.v_opmode(), instr.v_admode() - s = opmode - myesp = mRSP[instr.mode] - + size = instr.mode + myesp = mRSP[size] e = [] - e.append(m2_expr.ExprAff(mRBP[s], - m2_expr.ExprMem(mRBP[instr.mode], size=s))) + e.append(m2_expr.ExprAff(mRBP[size], + m2_expr.ExprMem(mRBP[size], size=size))) e.append(m2_expr.ExprAff(myesp, - m2_expr.ExprInt_fromsize(instr.mode, instr.mode / 8) + mRBP[instr.mode])) + m2_expr.ExprInt_fromsize(size, size / 8) + mRBP[size])) return e, [] |