about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/expression/expression.py6
-rw-r--r--miasm2/ir/analysis.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/miasm2/expression/expression.py b/miasm2/expression/expression.py
index 2b51ef61..c82aec2b 100644
--- a/miasm2/expression/expression.py
+++ b/miasm2/expression/expression.py
@@ -517,9 +517,6 @@ class ExprAff(Expr):
         else:
             return self._dst.get_w()
 
-    def is_function_call(self):
-        return isinstance(self.src, ExprOp) and self.src.op.startswith('call')
-
     def _exprhash(self):
         return hash((EXPRAFF, hash(self._dst), hash(self._src)))
 
@@ -821,6 +818,9 @@ class ExprOp(Expr):
                 return True
         return False
 
+    def is_function_call(self):
+        return self._op.startswith('call')
+
     def is_associative(self):
         "Return True iff current operation is associative"
         return (self._op in ['+', '*', '^', '&', '|'])
diff --git a/miasm2/ir/analysis.py b/miasm2/ir/analysis.py
index 51d2b2b7..31f6294c 100644
--- a/miasm2/ir/analysis.py
+++ b/miasm2/ir/analysis.py
@@ -167,7 +167,7 @@ class ira:
             # Function call, memory write or IRDst affectation
             for k, ir in enumerate(block.irs):
                 for i_cur in ir:
-                    if i_cur.is_function_call():
+                    if i_cur.src.is_function_call():
                         # /!\ never remove ir calls
                         useful.add((block.label, k, i_cur))
                     if isinstance(i_cur.dst, ExprMem):