diff options
| author | Ajax <commial@gmail.com> | 2017-04-24 17:38:19 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-04-24 17:39:04 +0200 |
| commit | 9b0f95d48250f41cdaa2da0a4ce86150a5751db4 (patch) | |
| tree | 62a5547a1d9e2d8aa408c147eb834f451b9a401a /miasm2/arch/x86/jit.py | |
| parent | 7ce0b4f473b2830ccc4d720455ba62c438e973c0 (diff) | |
| download | miasm-9b0f95d48250f41cdaa2da0a4ce86150a5751db4.tar.gz miasm-9b0f95d48250f41cdaa2da0a4ce86150a5751db4.zip | |
x86_32: fix fastcall (ret_addr is the last to be pushed)
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/x86/jit.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm2/arch/x86/jit.py b/miasm2/arch/x86/jit.py index e64c610b..aa01359a 100644 --- a/miasm2/arch/x86/jit.py +++ b/miasm2/arch/x86/jit.py @@ -152,12 +152,12 @@ class jitter_x86_32(jitter): def func_prepare_fastcall(self, ret_addr, *args): args_regs = ['ECX', 'EDX'] - self.push_uint32_t(ret_addr) for i in xrange(min(len(args), len(args_regs))): setattr(self.cpu, args_regs[i], args[i]) remaining_args = args[len(args_regs):] for arg in reversed(remaining_args): self.push_uint32_t(arg) + self.push_uint32_t(ret_addr) def get_arg_n_fastcall(self, index): args_regs = ['ECX', 'EDX'] |