diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-12-04 15:44:57 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-12-07 11:10:53 +0100 |
| commit | 0c5ca0a1784aac2b25cf7d9a263849020ebb94b5 (patch) | |
| tree | 5aa0285a56f78b7bed4441cedcfd8079ae136814 /miasm2/ir/ir.py | |
| parent | 126e77becb6e82850c831bdfeca10aadca6162a3 (diff) | |
| download | miasm-0c5ca0a1784aac2b25cf7d9a263849020ebb94b5.tar.gz miasm-0c5ca0a1784aac2b25cf7d9a263849020ebb94b5.zip | |
IR: use expr_is_label instead of ExprIsLabel
Diffstat (limited to '')
| -rw-r--r-- | miasm2/ir/ir.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/miasm2/ir/ir.py b/miasm2/ir/ir.py index 31994fae..c5c43a67 100644 --- a/miasm2/ir/ir.py +++ b/miasm2/ir/ir.py @@ -335,16 +335,11 @@ class ir(object): for b in self.blocs.values(): b.get_rw(regs_ids) - def ExprIsLabel(self, l): - #TODO : use expression helper - return isinstance(l, m2_expr.ExprId) and isinstance(l.name, - asmbloc.asm_label) - def sort_dst(self, todo, done): out = set() while todo: dst = todo.pop() - if self.ExprIsLabel(dst): + if asmbloc.expr_is_label(dst): done.add(dst) elif isinstance(dst, m2_expr.ExprMem) or isinstance(dst, m2_expr.ExprInt): done.add(dst) @@ -401,7 +396,7 @@ class ir(object): if isinstance(d, m2_expr.ExprInt): d = m2_expr.ExprId( self.symbol_pool.getby_offset_create(int(d.arg))) - if self.ExprIsLabel(d): + if asmbloc.expr_is_label(d): if d.name in self.blocs or link_all is True: self.g.add_edge(lbl, d.name) |