From 8f993d9a57f3e17b267da3629561b65b17cf97c0 Mon Sep 17 00:00:00 2001 From: Ajax Date: Tue, 24 Jul 2018 12:50:27 +0200 Subject: Jitter: add support for SystemV syscall convention (arml / x86_64) --- miasm2/arch/x86/jit.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'miasm2/arch/x86/jit.py') diff --git a/miasm2/arch/x86/jit.py b/miasm2/arch/x86/jit.py index bf74051d..3322e722 100644 --- a/miasm2/arch/x86/jit.py +++ b/miasm2/arch/x86/jit.py @@ -272,3 +272,11 @@ class jitter_x86_64(Jitter): remaining_args = args[len(args_regs):] for arg in reversed(remaining_args): self.push_uint64_t(arg) + + def syscall_args_systemv(self, n_args): + args = [self.cpu.RDI, self.cpu.RSI, self.cpu.RDX, self.cpu.R10, + self.cpu.R8, self.cpu.R9][:n_args] + return args + + def syscall_ret_systemv(self, value): + self.cpu.RAX = value -- cgit 1.4.1