about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2016-10-14 13:41:34 +0200
committerGitHub <noreply@github.com>2016-10-14 13:41:34 +0200
commit4bffc1140aecaf4d6e6f3ae2a049e326d6f4bb6f (patch)
tree0449dbc70a6573b7dba0b71fbe36abd32b1d6784
parent3dfe52b6a4fa6acfd1547565638a25cf6446ffdc (diff)
parentcca84493374bd41bebdb02357ef5afeda4fc1ecd (diff)
downloadmiasm-4bffc1140aecaf4d6e6f3ae2a049e326d6f4bb6f.tar.gz
miasm-4bffc1140aecaf4d6e6f3ae2a049e326d6f4bb6f.zip
Merge pull request #443 from serpilliere/fix_x86_lea_sem
Fix x86 LEA sem
Diffstat (limited to '')
-rw-r--r--miasm2/arch/x86/sem.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index 27ee5b80..69c21ac8 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -297,6 +297,10 @@ def movsx(ir, instr, a, b):
 
 def lea(ir, instr, a, b):
     src = b.arg
+    if b.is_op_segm():
+        # Do not use segmentation here
+        src = src.args[1]
+
     if src.size > a.size:
         src = src[:a.size]
     e = [m2_expr.ExprAff(a, src.zeroExtend(a.size))]