about summary refs log tree commit diff stats
path: root/miasm2/arch/x86/arch.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/arch/x86/arch.py')
-rw-r--r--miasm2/arch/x86/arch.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py
index 724f6b86..b5c72d32 100644
--- a/miasm2/arch/x86/arch.py
+++ b/miasm2/arch/x86/arch.py
@@ -1738,7 +1738,9 @@ def parse_mem(expr, parent, w8, sx=0, xmm=0, mm=0):
         else:
             return None, None, False
 
-    if (parent.mode == 64 and ptr.size == 32 and
+    if (not isinstance(ptr, ExprInt) and
+        parent.mode == 64 and
+        ptr.size == 32 and
         parent.admode != 1):
         return None, None, False
     dct_expr = {f_isad: True}
@@ -1980,6 +1982,7 @@ class x86_rm_arg(m_arg):
             v = v.items()
             v.sort()
             v = tuple(v)
+            admode = 64 if p.mode == 64 else admode
             if not v in modrm2byte[admode]:
                 continue
             xx = modrm2byte[admode][v]