Skip to content

Commit

Permalink
Merge pull request #1398 from 0xeb/main
Browse files Browse the repository at this point in the history
Fixed "POP reg_sp" in all modes
  • Loading branch information
serpilliere committed Nov 17, 2021
2 parents b825e90 + 3284421 commit ea5abb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miasm/arch/x86/sem.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,8 @@ def pop_gen(ir, instr, src, size):

sp = mRSP[instr.mode]
new_sp = sp + m2_expr.ExprInt(src.size // 8, sp.size)
# don't generate ESP incrementation on POP ESP
if src != ir.sp:
# Don't generate SP/ESP/RSP incrementation on POP SP/ESP/RSP
if not (src in mRSP.values()):
e.append(m2_expr.ExprAssign(sp, new_sp))
# XXX FIX XXX for pop [esp]
if isinstance(src, m2_expr.ExprMem):
Expand Down

0 comments on commit ea5abb5

Please sign in to comment.