about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm/arch/x86/sem.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm/arch/x86/sem.py b/miasm/arch/x86/sem.py
index 5b6ff917..ffa2641c 100644
--- a/miasm/arch/x86/sem.py
+++ b/miasm/arch/x86/sem.py
@@ -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):