diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-04-14 23:04:46 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2017-04-20 12:36:51 +0200 |
| commit | 4d511eab15845e519e5a8b0d9f742a550768b709 (patch) | |
| tree | 418429f7a3cdedf5efdf074126bc76dbd04f9657 /miasm2/ir/analysis.py | |
| parent | a9b3d7f1a9014336b46c6dca20332a6deaccfc6d (diff) | |
| download | miasm-4d511eab15845e519e5a8b0d9f742a550768b709.tar.gz miasm-4d511eab15845e519e5a8b0d9f742a550768b709.zip | |
IRBlock: move lines in AssignBlock
Diffstat (limited to 'miasm2/ir/analysis.py')
| -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" |