diff options
Diffstat (limited to 'miasm2/arch/x86')
| -rw-r--r-- | miasm2/arch/x86/arch.py | 2 | ||||
| -rw-r--r-- | miasm2/arch/x86/ira.py | 31 |
2 files changed, 20 insertions, 13 deletions
diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index bf872667..3a0fb78e 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -256,7 +256,7 @@ cl_or_imm |= base_expr class x86_arg(m_arg): def asm_ast_to_expr(self, value, loc_db, size_hint=None, fixed_size=None): if size_hint is None: - size_hint = self.parent.v_opmode() + size_hint = self.parent.mode if fixed_size is None: fixed_size = set() if isinstance(value, AstId): 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 |