diff options
| author | Camille Mougey <commial@gmail.com> | 2017-04-20 12:58:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-20 12:58:40 +0200 |
| commit | 4f5206dd8774a82ed2c864f4e6fe2d512f9d4408 (patch) | |
| tree | 418429f7a3cdedf5efdf074126bc76dbd04f9657 /miasm2/ir/analysis.py | |
| parent | ff981a11ef71960a239ec44295f06bb384124521 (diff) | |
| parent | 4d511eab15845e519e5a8b0d9f742a550768b709 (diff) | |
| download | miasm-4f5206dd8774a82ed2c864f4e6fe2d512f9d4408.tar.gz miasm-4f5206dd8774a82ed2c864f4e6fe2d512f9d4408.zip | |
Merge pull request #528 from serpilliere/assignblock_ro
Assignblock ro
Diffstat (limited to '')
| -rw-r--r-- | miasm2/ir/analysis.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/miasm2/ir/analysis.py b/miasm2/ir/analysis.py index 5c5193c9..1d9310fc 100644 --- a/miasm2/ir/analysis.py +++ b/miasm2/ir/analysis.py @@ -39,11 +39,11 @@ class ira(IntermediateRepresentation): @instr: native instruction which is responsible of the call """ - return [AssignBlock( - [ExprAff(self.ret_reg, ExprOp('call_func_ret', ad, self.sp)), - ExprAff(self.sp, ExprOp( - 'call_func_stack', ad, self.sp)), - ])] + assignblk = AssignBlock({ + self.ret_reg: ExprOp('call_func_ret', ad, self.sp), + self.sp: ExprOp('call_func_stack', ad, self.sp)}, + instr) + return [assignblk] def pre_add_instr(self, block, instr, irb_cur, ir_blocks_all, gen_pc_update): """Replace function call with corresponding call effects, @@ -53,7 +53,6 @@ class ira(IntermediateRepresentation): call_effects = self.call_effects(instr.args[0], instr) for assignblk in call_effects: irb_cur.irs.append(assignblk) - irb_cur.lines.append(instr) return None def gen_equations(self): @@ -70,8 +69,7 @@ class ira(IntermediateRepresentation): eqs.append(ExprAff(n_w, v)) print '*' * 40 print irb - irb.irs = [eqs] - irb.lines = [None] + irb.irs = [AssignBlock(eqs)] def sizeof_char(self): "Return the size of a char in bits" |