diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-02-27 14:29:38 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2015-02-27 15:36:29 +0100 |
| commit | 847e334dd981fc456f173b241eb018ccf7a0e82b (patch) | |
| tree | 0a0de39f6d692be062763b4c7fdcc1ae5da6ec75 /miasm2/arch/x86/sem.py | |
| parent | 4c68514f01aac6297179f1c271368dd5ca48c01e (diff) | |
| download | miasm-847e334dd981fc456f173b241eb018ccf7a0e82b.tar.gz miasm-847e334dd981fc456f173b241eb018ccf7a0e82b.zip | |
X86/sem: fix leave semantic
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, [] |