Go to the documentation of this file.
6 #ifndef __SYSDEP_STUB_H
7 #define __SYSDEP_STUB_H
11 #define STUB_SYSCALL_RET PT_INDEX(RAX)
12 #define STUB_MMAP_NR __NR_mmap
13 #define MMAP_OFFSET(o) (o)
15 #define __syscall_clobber "r11","rcx","memory"
16 #define __syscall "syscall"
18 static inline long stub_syscall0(
long syscall)
40 static inline long stub_syscall3(
long syscall,
long arg1,
long arg2,
long arg3)
46 :
"0" (syscall),
"D" (
arg1),
"S" (arg2),
"d" (
arg3)
52 static inline long stub_syscall4(
long syscall,
long arg1,
long arg2,
long arg3,
59 :
"0" (syscall),
"D" (
arg1),
"S" (arg2),
"d" (
arg3),
66 static inline long stub_syscall5(
long syscall,
long arg1,
long arg2,
long arg3,
73 :
"0" (syscall),
"D" (
arg1),
"S" (arg2),
"d" (
arg3),
74 "g" (arg4),
"g" (
arg5)
80 static inline void trap_myself(
void)
85 static inline void remap_stack(
long fd,
unsigned long offset)
87 __asm__ volatile (
"movq %4,%%r10 ; movq %5,%%r8 ; "
88 "movq %6, %%r9; " __syscall "; movq %7, %%rbx ; "
89 "movq %%rax, (%%rbx)":
91 "S" (UM_KERN_PAGE_SIZE),