about summary refs log tree commit diff stats
path: root/miasm2/arch/arm/jit.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2018-07-24 12:50:27 +0200
committerAjax <commial@gmail.com>2018-07-24 12:53:58 +0200
commit8f993d9a57f3e17b267da3629561b65b17cf97c0 (patch)
treed7e2eaf5f3798d38c37bc0224b25d586f54102cc /miasm2/arch/arm/jit.py
parentb4177eb4deb63cf781d0c8d98f834d4a91c71453 (diff)
downloadmiasm-8f993d9a57f3e17b267da3629561b65b17cf97c0.tar.gz
miasm-8f993d9a57f3e17b267da3629561b65b17cf97c0.zip
Jitter: add support for SystemV syscall convention (arml / x86_64)
Diffstat (limited to 'miasm2/arch/arm/jit.py')
-rw-r--r--miasm2/arch/arm/jit.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/miasm2/arch/arm/jit.py b/miasm2/arch/arm/jit.py
index 2b5dc4cf..267bcea6 100644
--- a/miasm2/arch/arm/jit.py
+++ b/miasm2/arch/arm/jit.py
@@ -106,6 +106,14 @@ class jitter_arml(Jitter):
     func_prepare_systemv = func_prepare_stdcall
     get_arg_n_systemv = get_arg_n_stdcall
 
+    def syscall_args_systemv(self, n_args):
+        args = [self.cpu.R0, self.cpu.R1, self.cpu.R2, self.cpu.R3,
+            self.cpu.R4, self.cpu.R5][:n_args]
+        return args
+
+    def syscall_ret_systemv(self, value):
+        self.cpu.R0 = value
+
     def init_run(self, *args, **kwargs):
         Jitter.init_run(self, *args, **kwargs)
         self.cpu.PC = self.pc