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.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py
index e90859d8..91a6acb9 100644
--- a/miasm2/arch/x86/arch.py
+++ b/miasm2/arch/x86/arch.py
@@ -1162,10 +1162,12 @@ class x86_s08to16(x86_imm):
 
 
 class x86_s08to32(x86_s08to16):
-    myexpr = lambda self, x: ExprInt32(x)
     in_size = 8
     out_size = 32
 
+    def myexpr(self, x):
+        return ExprInt32(x)
+
     def decode(self, v):
         v = v & self.lmask
         v = self.decodeval(v)
@@ -1180,10 +1182,12 @@ class x86_s08to32(x86_s08to16):
 
 
 class x86_s08to64(x86_s08to16):
-    myexpr = lambda self, x: ExprInt64(x)
     in_size = 8
     out_size = 64
 
+    def myexpr(self, x):
+        return ExprInt64(x)
+
     def decode(self, v):
         v = v & self.lmask
         v = self.decodeval(v)
@@ -1198,10 +1202,12 @@ class x86_s08to64(x86_s08to16):
 
 
 class x86_s32to64(x86_s08to32):
-    myexpr = lambda self, x: ExprInt64(x)
     in_size = 32
     out_size = 64
 
+    def myexpr(self, x):
+        return ExprInt64(x)
+
 
 class bs_eax(m_arg):
     reg_info = r_eax_all
@@ -1690,7 +1696,7 @@ def exprfindmod(e, o=None):
 
 
 def expr2modrm(e, p, w8, sx=0, xmm=0, mm=0):
-    o = defaultdict(lambda x: 0)
+    o = {}
     if e.size == 64 and not e in gpregs_mm.expr:
         if hasattr(p, 'sd'):
             p.sd.value = 1