about summary refs log tree commit diff stats
path: root/miasm2/arch/ppc/ira.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/arch/ppc/ira.py')
-rw-r--r--miasm2/arch/ppc/ira.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/miasm2/arch/ppc/ira.py b/miasm2/arch/ppc/ira.py
index 2459c0e4..76a979ae 100644
--- a/miasm2/arch/ppc/ira.py
+++ b/miasm2/arch/ppc/ira.py
@@ -22,6 +22,19 @@ class ir_a_ppc32b(ir_ppc32b, ira):
         for irblock in leaves:
             self.set_dead_regs(irblock)
 
+    def call_effects(self, ad, instr):
+        return [AssignBlock([ExprAff(self.ret_reg, ExprOp('call_func_ret', ad,
+                                                          self.sp,
+                                                          self.arch.regs.R3,
+                                                          self.arch.regs.R4,
+                                                          self.arch.regs.R5,
+                                                          )),
+                             ExprAff(self.sp, ExprOp('call_func_stack',
+                                                     ad, self.sp)),
+                            ],
+                             instr
+                           )]
+
     def pre_add_instr(self, block, instr, assignments, ir_blocks_all, gen_pc_update):
         """Replace function call with corresponding call effects,
         inside the IR block"""