diff options
| author | Ajax <commial@gmail.com> | 2017-01-19 20:53:23 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-01-24 13:46:38 +0100 |
| commit | 69baa6b83d9a2404ea33f3d16e2b25cfb3ef7caf (patch) | |
| tree | b3faa556710baee385981bb4c1a5227cbf391149 /miasm2/ir/analysis.py | |
| parent | 5ad8e8b70b1ed1ba6f38f2e4b070154e717cbd05 (diff) | |
| download | miasm-69baa6b83d9a2404ea33f3d16e2b25cfb3ef7caf.tar.gz miasm-69baa6b83d9a2404ea33f3d16e2b25cfb3ef7caf.zip | |
Let x86 'pre_add_instr' be the default behavior
Diffstat (limited to '')
| -rw-r--r-- | miasm2/ir/analysis.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/miasm2/ir/analysis.py b/miasm2/ir/analysis.py index 0913019b..73391bb2 100644 --- a/miasm2/ir/analysis.py +++ b/miasm2/ir/analysis.py @@ -44,6 +44,17 @@ class ira(ir): 'call_func_stack', ad, self.sp)), ])] + def pre_add_instr(self, block, instr, irb_cur, ir_blocks_all, gen_pc_update): + """Replace function call with corresponding call effects, + inside the IR block""" + if not instr.is_subcall(): + return irb_cur + 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 remove_dead_instr(self, irb, useful): """Remove dead affectations using previous reaches analysis @irb: irbloc instance |