about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/arch/x86/arch.py14
-rw-r--r--miasm2/core/cpu.py2
2 files changed, 10 insertions, 6 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
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py
index c230775f..c01759f4 100644
--- a/miasm2/core/cpu.py
+++ b/miasm2/core/cpu.py
@@ -952,8 +952,6 @@ class instruction(object):
         o = "%-10s " % self.name
         args = []
         args_str = self.args_str
-        if args_str is None:
-            args_str = [lambda x:str(x) for i in xrange(len(self.args))]
         for arg, arg_str in zip(self.args, args_str):
             if not isinstance(arg, Expr):
                 raise ValueError('zarb arg type')