diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2018-07-12 12:38:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-12 12:38:08 +0200 |
| commit | 82eb5f6eb197fc59d2e9ae21cfda05a1868e462e (patch) | |
| tree | f1e62fa63e9f0f903acf9ab9eb1a818b16013220 | |
| parent | 9ac830aef7a15edb499658474282b5889b955b1a (diff) | |
| parent | d598d9b03dd6f06dfa7f3bbbfdfaa6a5e0e16f25 (diff) | |
| download | miasm-82eb5f6eb197fc59d2e9ae21cfda05a1868e462e.tar.gz miasm-82eb5f6eb197fc59d2e9ae21cfda05a1868e462e.zip | |
Merge pull request #797 from aguinet/fix/arm_call
Fix ARM C function calling
| -rw-r--r-- | miasm2/arch/arm/jit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/arch/arm/jit.py b/miasm2/arch/arm/jit.py index 10a7c644..2b5dc4cf 100644 --- a/miasm2/arch/arm/jit.py +++ b/miasm2/arch/arm/jit.py @@ -90,8 +90,8 @@ class jitter_arml(Jitter): def func_prepare_stdcall(self, ret_addr, *args): for index in xrange(min(len(args), 4)): setattr(self.cpu, 'R%d' % index, args[index]) - for index in xrange(4, len(args)): - self.vm.set_mem(self.cpu.SP + 4 * (index - 4), pck32(args[index])) + for index in reversed(xrange(4, len(args))): + self.push_uint32_t(args[index]) self.cpu.LR = ret_addr def get_arg_n_stdcall(self, index): |