about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2018-07-12 12:38:08 +0200
committerGitHub <noreply@github.com>2018-07-12 12:38:08 +0200
commit82eb5f6eb197fc59d2e9ae21cfda05a1868e462e (patch)
treef1e62fa63e9f0f903acf9ab9eb1a818b16013220
parent9ac830aef7a15edb499658474282b5889b955b1a (diff)
parentd598d9b03dd6f06dfa7f3bbbfdfaa6a5e0e16f25 (diff)
downloadmiasm-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.py4
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):