diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-18 07:44:59 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-07-18 07:45:08 +0200 |
| commit | 7d2227eeb09a0ec43a837082570a0cb955651daa (patch) | |
| tree | 04780ca818378f42bc91efe2fc2d88a2d77692f7 /miasm2/arch/x86/ira.py | |
| parent | cf74092981e4f3fa7bed9ce182a38e570653a138 (diff) | |
| download | miasm-7d2227eeb09a0ec43a837082570a0cb955651daa.tar.gz miasm-7d2227eeb09a0ec43a837082570a0cb955651daa.zip | |
IR/Analysis: call_effects can add extra blocks
Diffstat (limited to 'miasm2/arch/x86/ira.py')
| -rw-r--r-- | miasm2/arch/x86/ira.py | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/miasm2/arch/x86/ira.py b/miasm2/arch/x86/ira.py index be10213e..a95e6c69 100644 --- a/miasm2/arch/x86/ira.py +++ b/miasm2/arch/x86/ira.py @@ -44,18 +44,25 @@ class ir_a_x86_64(ir_x86_64, ir_a_x86_16): self.ret_reg = self.arch.regs.RAX def call_effects(self, ad, instr): - return [AssignBlock([ExprAff(self.ret_reg, ExprOp('call_func_ret', ad, - self.sp, - self.arch.regs.RCX, - self.arch.regs.RDX, - self.arch.regs.R8, - self.arch.regs.R9, - )), - ExprAff(self.sp, ExprOp('call_func_stack', - ad, self.sp)), - ], - instr - )] + call_assignblk = AssignBlock( + [ + ExprAff( + self.ret_reg, + ExprOp( + 'call_func_ret', + ad, + self.sp, + self.arch.regs.RCX, + self.arch.regs.RDX, + self.arch.regs.R8, + self.arch.regs.R9, + ) + ), + ExprAff(self.sp, ExprOp('call_func_stack', ad, self.sp)), + ], + instr + ) + return [call_assignblk], [] def sizeof_char(self): return 8 |