Skip to content

Instantly share code, notes, and snippets.

@Chubek
Last active May 31, 2023 13:46
Show Gist options
  • Save Chubek/c70554c88130b0ff665c7ceec684119a to your computer and use it in GitHub Desktop.
Save Chubek/c70554c88130b0ff665c7ceec684119a to your computer and use it in GitHub Desktop.
Tools to Mix C and Assembly

This gist contains C preprocessor files to mix C and Assembly easier.

  • syscnr.inc includes all the Linux system call numbers.
  • registers.inc includes all the Linux ABI registers for both C and system calls. Arguments start at 0.
  • syscall.inc includes macros for syscalls based on argument number.

Please do not remove the newline at the end of each file. Head to my Github profile where you will find a lot of goodies, a lot of projects and the such and so. My project Panah has some good Assembly code mixed with C.

Enjoy.

#define SYSC_NREG %rax
#define SYSC_AGQ0 %rdi
#define SYSC_AGQ1 %rsi
#define SYSC_AGQ2 %rdx
#define SYSC_AGQ3 %r10
#define SYSC_AGQ4 %r8
#define SYSC_AGQ5 %r9
#define SYSC_RETQ %rax
#define SYSC_AGD0 %edi
#define SYSC_AGD1 %esi
#define SYSC_AGD2 %edx
#define SYSC_AGD3 %r10d
#define SYSC_AGD4 %r8d
#define SYSC_AGD5 %r9d
#define SYSC_RETD %eax
#define SYSC_AGW0 %di
#define SYSC_AGW1 %si
#define SYSC_AGW2 %dx
#define SYSC_AGW3 %r10w
#define SYSC_AGW4 %r8w
#define SYSC_AGW5 %r9w
#define SYSC_RETW %ax
#define SYSC_AGL0 %dl
#define SYSC_AGL1 %sil
#define SYSC_AGL2 %dl
#define SYSC_AGL3 %r10b
#define SYSC_AGL4 %r8b
#define SYSC_AGL5 %r9b
#define SYSC_RETL %al
#define SYSC_AGH0 %dh
#define SYSC_AGH1 %sil
#define SYSC_AGH2 %dh
#define SYSC_AGH3 %r10b
#define SYSC_AGH4 %r8b
#define SYSC_AGH5 %r9b
#define SYSC_RETH %ah
#define CABI_AGQ0 %rdi
#define CABI_AGQ1 %rsi
#define CABI_AGQ2 %rdx
#define CABI_AGQ3 %rcx
#define CABI_AGQ4 %r8
#define CABI_AGQ5 %r9
#define CABI_RETQ %rax
#define CABI_AGD0 %edi
#define CABI_AGD1 %esi
#define CABI_AGD2 %edx
#define CABI_AGD3 %ecx
#define CABI_AGD4 %r8d
#define CABI_AGD5 %r9d
#define CABI_RETD %eax
#define CABI_AGW0 %di
#define CABI_AGW1 %si
#define CABI_AGW2 %dx
#define CABI_AGW3 %cx
#define CABI_AGW4 %r8w
#define CABI_AGW5 %r9w
#define CABI_RETW %ax
#define CABI_AGL0 %dl
#define CABI_AGL1 %sil
#define CABI_AGL2 %dl
#define CABI_AGL3 %cl
#define CABI_AGL4 %r8b
#define CABI_AGL5 %r9b
#define CABI_RETL %al
#define CABI_AGH0 %dh
#define CABI_AGH1 %sil
#define CABI_AGH2 %dh
#define CABI_AGH3 %ch
#define CABI_AGH4 %r8b
#define CABI_AGH5 %r9b
#define CABI_RETH %ah
#define CNTR_QWRD %rcx
#define CNTR_DWRD %ecx
#define CNTR_WORD %cx
#define CNTR_LOWB %cl
#define CNTR_HIIB %ch
#define ACCM_QWRD %rax
#define ACCM_DWRD %eax
#define ACCM_WORD %ax
#define ACCM_LOWB %al
#define ACCM_HIIB %ah
#define STPT_QWRD %rsp
#define STPT_DWRD %esp
#define STPT_WORD %sp
#define STPT_LOWB %spl
#define FPPT_QWRD %rbp
#define FPPT_DWRD %ebp
#define FPPT_WORD %bp
#define FPPT_LOWB %bpl
#define CLB1_QWRD %r10
#define CLB1_DWRD %r10d
#define CLB1_WORD %r10w
#define CLB1_LOWB %r10b
#define CLB2_QWRD %r11
#define CLB2_DWRD %r11d
#define CLB2_WORD %r11w
#define CLB2_LOWB %r11b
#define CSV1_QWRD %r8
#define CSV1_DWRD %r8d
#define CSV1_WORD %r8w
#define CSV1_LOWB %r8b
#define CSV2_QWRD %r9
#define CSV2_DWRD %r9d
#define CSV2_WORD %r9w
#define CSV2_LOWB %r9b
#define CSV3_QWRD %r12
#define CSV3_DWRD %r12d
#define CSV3_WORD %r12w
#define CSV3_LOWB %r12b
#define CSV4_QWRD %r13
#define CSV4_DWRD %r13d
#define CSV4_WORD %r13w
#define CSV4_LOWB %r13b
#define CSV5_QWRD %r14
#define CSV5_DWRD %r14d
#define CSV5_WORD %r14w
#define CSV5_LOWB %r14b
#define CSV6_QWRD %r15
#define CSV6_DWRD %r15d
#define CSV6_WORD %r15w
#define CSV6_LOWB %r15b
#define SRCR_QWRD %rsi
#define SRCR_DWRD %esi
#define SRCR_WORD %si
#define SRCR_LOWB %sil
#define DATA_QWRD %rdx
#define DATA_DWRD %edx
#define DATA_WORD %dx
#define DATA_LOWB %dl
#define DATA_HIIB %dh
#define DEST_QWRD %rdi
#define DEST_DWRD %edi
#define DEST_WORD %di
#define DEST_LOWB %dl
#define DEST_HIIB %dh
#define BASE_QWRD %rbx
#define BASE_DWRD %ebx
#define BASE_WORD %bx
#define BASE_LOWB %bl
#define BASE_HIIB %bh
#define REGISTER_zero_out(reg) \
xorq reg, reg
IMPLEMENT_syscall(SYSCALL_read, SYSCNR_read)
IMPLEMENT_syscall(SYSCALL_write, SYSCNR_write)
IMPLEMENT_syscall(SYSCALL_open, SYSCNR_open)
IMPLEMENT_syscall(SYSCALL_close, SYSCNR_close)
IMPLEMENT_syscall(SYSCALL_stat, SYSCNR_stat)
IMPLEMENT_syscall(SYSCALL_fstat, SYSCNR_fstat)
IMPLEMENT_syscall(SYSCALL_lstat, SYSCNR_lstat)
IMPLEMENT_syscall(SYSCALL_poll, SYSCNR_poll)
IMPLEMENT_syscall(SYSCALL_lseek, SYSCNR_lseek)
IMPLEMENT_syscall(SYSCALL_mmap, SYSCNR_mmap)
IMPLEMENT_syscall(SYSCALL_mprotect, SYSCNR_mprotect)
IMPLEMENT_syscall(SYSCALL_munmap, SYSCNR_munmap)
IMPLEMENT_syscall(SYSCALL_brk, SYSCNR_brk)
IMPLEMENT_syscall(SYSCALL_rt_sigaction, SYSCNR_rt_sigaction)
IMPLEMENT_syscall(SYSCALL_rt_sigprocmask, SYSCNR_rt_sigprocmask)
IMPLEMENT_syscall(SYSCALL_rt_sigreturn, SYSCNR_rt_sigreturn)
IMPLEMENT_syscall(SYSCALL_ioctl, SYSCNR_ioctl)
IMPLEMENT_syscall(SYSCALL_pread64, SYSCNR_pread64)
IMPLEMENT_syscall(SYSCALL_pwrite64, SYSCNR_pwrite64)
IMPLEMENT_syscall(SYSCALL_readv, SYSCNR_readv)
IMPLEMENT_syscall(SYSCALL_writev, SYSCNR_writev)
IMPLEMENT_syscall(SYSCALL_access, SYSCNR_access)
IMPLEMENT_syscall(SYSCALL_pipe, SYSCNR_pipe)
IMPLEMENT_syscall(SYSCALL_select, SYSCNR_select)
IMPLEMENT_syscall(SYSCALL_sched_yield, SYSCNR_sched_yield)
IMPLEMENT_syscall(SYSCALL_mremap, SYSCNR_mremap)
IMPLEMENT_syscall(SYSCALL_msync, SYSCNR_msync)
IMPLEMENT_syscall(SYSCALL_mincore, SYSCNR_mincore)
IMPLEMENT_syscall(SYSCALL_madvise, SYSCNR_madvise)
IMPLEMENT_syscall(SYSCALL_shmget, SYSCNR_shmget)
IMPLEMENT_syscall(SYSCALL_shmat, SYSCNR_shmat)
IMPLEMENT_syscall(SYSCALL_shmctl, SYSCNR_shmctl)
IMPLEMENT_syscall(SYSCALL_dup, SYSCNR_dup)
IMPLEMENT_syscall(SYSCALL_dup2, SYSCNR_dup2)
IMPLEMENT_syscall(SYSCALL_pause, SYSCNR_pause)
IMPLEMENT_syscall(SYSCALL_nanosleep, SYSCNR_nanosleep)
IMPLEMENT_syscall(SYSCALL_getitimer, SYSCNR_getitimer)
IMPLEMENT_syscall(SYSCALL_alarm, SYSCNR_alarm)
IMPLEMENT_syscall(SYSCALL_setitimer, SYSCNR_setitimer)
IMPLEMENT_syscall(SYSCALL_getpid, SYSCNR_getpid)
IMPLEMENT_syscall(SYSCALL_sendfile, SYSCNR_sendfile)
IMPLEMENT_syscall(SYSCALL_socket, SYSCNR_socket)
IMPLEMENT_syscall(SYSCALL_connect, SYSCNR_connect)
IMPLEMENT_syscall(SYSCALL_accept, SYSCNR_accept)
IMPLEMENT_syscall(SYSCALL_sendto, SYSCNR_sendto)
IMPLEMENT_syscall(SYSCALL_recvfrom, SYSCNR_recvfrom)
IMPLEMENT_syscall(SYSCALL_sendmsg, SYSCNR_sendmsg)
IMPLEMENT_syscall(SYSCALL_recvmsg, SYSCNR_recvmsg)
IMPLEMENT_syscall(SYSCALL_shutdown, SYSCNR_shutdown)
IMPLEMENT_syscall(SYSCALL_bind, SYSCNR_bind)
IMPLEMENT_syscall(SYSCALL_listen, SYSCNR_listen)
IMPLEMENT_syscall(SYSCALL_getsockname, SYSCNR_getsockname)
IMPLEMENT_syscall(SYSCALL_getpeername, SYSCNR_getpeername)
IMPLEMENT_syscall(SYSCALL_socketpair, SYSCNR_socketpair)
IMPLEMENT_syscall(SYSCALL_setsockopt, SYSCNR_setsockopt)
IMPLEMENT_syscall(SYSCALL_getsockopt, SYSCNR_getsockopt)
IMPLEMENT_syscall(SYSCALL_clone, SYSCNR_clone)
IMPLEMENT_syscall(SYSCALL_fork, SYSCNR_fork)
IMPLEMENT_syscall(SYSCALL_vfork, SYSCNR_vfork)
IMPLEMENT_syscall(SYSCALL_execve, SYSCNR_execve)
IMPLEMENT_syscall(SYSCALL_exit, SYSCNR_exit)
IMPLEMENT_syscall(SYSCALL_wait4, SYSCNR_wait4)
IMPLEMENT_syscall(SYSCALL_kill, SYSCNR_kill)
IMPLEMENT_syscall(SYSCALL_uname, SYSCNR_uname)
IMPLEMENT_syscall(SYSCALL_semget, SYSCNR_semget)
IMPLEMENT_syscall(SYSCALL_semop, SYSCNR_semop)
IMPLEMENT_syscall(SYSCALL_semctl, SYSCNR_semctl)
IMPLEMENT_syscall(SYSCALL_shmdt, SYSCNR_shmdt)
IMPLEMENT_syscall(SYSCALL_msgget, SYSCNR_msgget)
IMPLEMENT_syscall(SYSCALL_msgsnd, SYSCNR_msgsnd)
IMPLEMENT_syscall(SYSCALL_msgrcv, SYSCNR_msgrcv)
IMPLEMENT_syscall(SYSCALL_msgctl, SYSCNR_msgctl)
IMPLEMENT_syscall(SYSCALL_fcntl, SYSCNR_fcntl)
IMPLEMENT_syscall(SYSCALL_flock, SYSCNR_flock)
IMPLEMENT_syscall(SYSCALL_fsync, SYSCNR_fsync)
IMPLEMENT_syscall(SYSCALL_fdatasync, SYSCNR_fdatasync)
IMPLEMENT_syscall(SYSCALL_truncate, SYSCNR_truncate)
IMPLEMENT_syscall(SYSCALL_ftruncate, SYSCNR_ftruncate)
IMPLEMENT_syscall(SYSCALL_getdents, SYSCNR_getdents)
IMPLEMENT_syscall(SYSCALL_getcwd, SYSCNR_getcwd)
IMPLEMENT_syscall(SYSCALL_chdir, SYSCNR_chdir)
IMPLEMENT_syscall(SYSCALL_fchdir, SYSCNR_fchdir)
IMPLEMENT_syscall(SYSCALL_rename, SYSCNR_rename)
IMPLEMENT_syscall(SYSCALL_mkdir, SYSCNR_mkdir)
IMPLEMENT_syscall(SYSCALL_rmdir, SYSCNR_rmdir)
IMPLEMENT_syscall(SYSCALL_creat, SYSCNR_creat)
IMPLEMENT_syscall(SYSCALL_link, SYSCNR_link)
IMPLEMENT_syscall(SYSCALL_unlink, SYSCNR_unlink)
IMPLEMENT_syscall(SYSCALL_symlink, SYSCNR_symlink)
IMPLEMENT_syscall(SYSCALL_readlink, SYSCNR_readlink)
IMPLEMENT_syscall(SYSCALL_chmod, SYSCNR_chmod)
IMPLEMENT_syscall(SYSCALL_fchmod, SYSCNR_fchmod)
IMPLEMENT_syscall(SYSCALL_chown, SYSCNR_chown)
IMPLEMENT_syscall(SYSCALL_fchown, SYSCNR_fchown)
IMPLEMENT_syscall(SYSCALL_lchown, SYSCNR_lchown)
IMPLEMENT_syscall(SYSCALL_umask, SYSCNR_umask)
IMPLEMENT_syscall(SYSCALL_gettimeofday, SYSCNR_gettimeofday)
IMPLEMENT_syscall(SYSCALL_getrlimit, SYSCNR_getrlimit)
IMPLEMENT_syscall(SYSCALL_getrusage, SYSCNR_getrusage)
IMPLEMENT_syscall(SYSCALL_sysinfo, SYSCNR_sysinfo)
IMPLEMENT_syscall(SYSCALL_times, SYSCNR_times)
IMPLEMENT_syscall(SYSCALL_ptrace, SYSCNR_ptrace)
IMPLEMENT_syscall(SYSCALL_getuid, SYSCNR_getuid)
IMPLEMENT_syscall(SYSCALL_syslog, SYSCNR_syslog)
IMPLEMENT_syscall(SYSCALL_getgid, SYSCNR_getgid)
IMPLEMENT_syscall(SYSCALL_setuid, SYSCNR_setuid)
IMPLEMENT_syscall(SYSCALL_setgid, SYSCNR_setgid)
IMPLEMENT_syscall(SYSCALL_geteuid, SYSCNR_geteuid)
IMPLEMENT_syscall(SYSCALL_getegid, SYSCNR_getegid)
IMPLEMENT_syscall(SYSCALL_setpgid, SYSCNR_setpgid)
IMPLEMENT_syscall(SYSCALL_getppid, SYSCNR_getppid)
IMPLEMENT_syscall(SYSCALL_getpgrp, SYSCNR_getpgrp)
IMPLEMENT_syscall(SYSCALL_setsid, SYSCNR_setsid)
IMPLEMENT_syscall(SYSCALL_setreuid, SYSCNR_setreuid)
IMPLEMENT_syscall(SYSCALL_setregid, SYSCNR_setregid)
IMPLEMENT_syscall(SYSCALL_getgroups, SYSCNR_getgroups)
IMPLEMENT_syscall(SYSCALL_setgroups, SYSCNR_setgroups)
IMPLEMENT_syscall(SYSCALL_setresuid, SYSCNR_setresuid)
IMPLEMENT_syscall(SYSCALL_getresuid, SYSCNR_getresuid)
IMPLEMENT_syscall(SYSCALL_setresgid, SYSCNR_setresgid)
IMPLEMENT_syscall(SYSCALL_getresgid, SYSCNR_getresgid)
IMPLEMENT_syscall(SYSCALL_getpgid, SYSCNR_getpgid)
IMPLEMENT_syscall(SYSCALL_setfsuid, SYSCNR_setfsuid)
IMPLEMENT_syscall(SYSCALL_setfsgid, SYSCNR_setfsgid)
IMPLEMENT_syscall(SYSCALL_getsid, SYSCNR_getsid)
IMPLEMENT_syscall(SYSCALL_capget, SYSCNR_capget)
IMPLEMENT_syscall(SYSCALL_capset, SYSCNR_capset)
IMPLEMENT_syscall(SYSCALL_rt_sigpending, SYSCNR_rt_sigpending)
IMPLEMENT_syscall(SYSCALL_rt_sigtimedwait, SYSCNR_rt_sigtimedwait)
IMPLEMENT_syscall(SYSCALL_rt_sigqueueinfo, SYSCNR_rt_sigqueueinfo)
IMPLEMENT_syscall(SYSCALL_rt_sigsuspend, SYSCNR_rt_sigsuspend)
IMPLEMENT_syscall(SYSCALL_sigaltstack, SYSCNR_sigaltstack)
IMPLEMENT_syscall(SYSCALL_utime, SYSCNR_utime)
IMPLEMENT_syscall(SYSCALL_mknod, SYSCNR_mknod)
IMPLEMENT_syscall(SYSCALL_uselib, SYSCNR_uselib)
IMPLEMENT_syscall(SYSCALL_personality, SYSCNR_personality)
IMPLEMENT_syscall(SYSCALL_ustat, SYSCNR_ustat)
IMPLEMENT_syscall(SYSCALL_statfs, SYSCNR_statfs)
IMPLEMENT_syscall(SYSCALL_fstatfs, SYSCNR_fstatfs)
IMPLEMENT_syscall(SYSCALL_sysfs, SYSCNR_sysfs)
IMPLEMENT_syscall(SYSCALL_getpriority, SYSCNR_getpriority)
IMPLEMENT_syscall(SYSCALL_setpriority, SYSCNR_setpriority)
IMPLEMENT_syscall(SYSCALL_sched_setparam, SYSCNR_sched_setparam)
IMPLEMENT_syscall(SYSCALL_sched_getparam, SYSCNR_sched_getparam)
IMPLEMENT_syscall(SYSCALL_sched_setscheduler, SYSCNR_sched_setscheduler)
IMPLEMENT_syscall(SYSCALL_sched_getscheduler, SYSCNR_sched_getscheduler)
IMPLEMENT_syscall(SYSCALL_sched_get_priority_max, SYSCNR_sched_get_priority_max)
IMPLEMENT_syscall(SYSCALL_sched_get_priority_min, SYSCNR_sched_get_priority_min)
IMPLEMENT_syscall(SYSCALL_sched_rr_get_interval, SYSCNR_sched_rr_get_interval)
IMPLEMENT_syscall(SYSCALL_mlock, SYSCNR_mlock)
IMPLEMENT_syscall(SYSCALL_munlock, SYSCNR_munlock)
IMPLEMENT_syscall(SYSCALL_mlockall, SYSCNR_mlockall)
IMPLEMENT_syscall(SYSCALL_munlockall, SYSCNR_munlockall)
IMPLEMENT_syscall(SYSCALL_vhangup, SYSCNR_vhangup)
IMPLEMENT_syscall(SYSCALL_modify_ldt, SYSCNR_modify_ldt)
IMPLEMENT_syscall(SYSCALL_pivot_root, SYSCNR_pivot_root)
IMPLEMENT_syscall(SYSCALL__sysctl, SYSCNR__sysctl)
IMPLEMENT_syscall(SYSCALL_prctl, SYSCNR_prctl)
IMPLEMENT_syscall(SYSCALL_arch_prctl, SYSCNR_arch_prctl)
IMPLEMENT_syscall(SYSCALL_adjtimex, SYSCNR_adjtimex)
IMPLEMENT_syscall(SYSCALL_setrlimit, SYSCNR_setrlimit)
IMPLEMENT_syscall(SYSCALL_chroot, SYSCNR_chroot)
IMPLEMENT_syscall(SYSCALL_sync, SYSCNR_sync)
IMPLEMENT_syscall(SYSCALL_acct, SYSCNR_acct)
IMPLEMENT_syscall(SYSCALL_settimeofday, SYSCNR_settimeofday)
IMPLEMENT_syscall(SYSCALL_mount, SYSCNR_mount)
IMPLEMENT_syscall(SYSCALL_umount2, SYSCNR_umount2)
IMPLEMENT_syscall(SYSCALL_swapon, SYSCNR_swapon)
IMPLEMENT_syscall(SYSCALL_swapoff, SYSCNR_swapoff)
IMPLEMENT_syscall(SYSCALL_reboot, SYSCNR_reboot)
IMPLEMENT_syscall(SYSCALL_sethostname, SYSCNR_sethostname)
IMPLEMENT_syscall(SYSCALL_setdomainname, SYSCNR_setdomainname)
IMPLEMENT_syscall(SYSCALL_iopl, SYSCNR_iopl)
IMPLEMENT_syscall(SYSCALL_ioperm, SYSCNR_ioperm)
IMPLEMENT_syscall(SYSCALL_create_module, SYSCNR_create_module)
IMPLEMENT_syscall(SYSCALL_init_module, SYSCNR_init_module)
IMPLEMENT_syscall(SYSCALL_delete_module, SYSCNR_delete_module)
IMPLEMENT_syscall(SYSCALL_get_kernel_syms, SYSCNR_get_kernel_syms)
IMPLEMENT_syscall(SYSCALL_query_module, SYSCNR_query_module)
IMPLEMENT_syscall(SYSCALL_quotactl, SYSCNR_quotactl)
IMPLEMENT_syscall(SYSCALL_nfsservctl, SYSCNR_nfsservctl)
IMPLEMENT_syscall(SYSCALL_getpmsg, SYSCNR_getpmsg)
IMPLEMENT_syscall(SYSCALL_putpmsg, SYSCNR_putpmsg)
IMPLEMENT_syscall(SYSCALL_afs_syscall, SYSCNR_afs_syscall)
IMPLEMENT_syscall(SYSCALL_tuxcall, SYSCNR_tuxcall)
IMPLEMENT_syscall(SYSCALL_security, SYSCNR_security)
IMPLEMENT_syscall(SYSCALL_gettid, SYSCNR_gettid)
IMPLEMENT_syscall(SYSCALL_readahead, SYSCNR_readahead)
IMPLEMENT_syscall(SYSCALL_setxattr, SYSCNR_setxattr)
IMPLEMENT_syscall(SYSCALL_lsetxattr, SYSCNR_lsetxattr)
IMPLEMENT_syscall(SYSCALL_fsetxattr, SYSCNR_fsetxattr)
IMPLEMENT_syscall(SYSCALL_getxattr, SYSCNR_getxattr)
IMPLEMENT_syscall(SYSCALL_lgetxattr, SYSCNR_lgetxattr)
IMPLEMENT_syscall(SYSCALL_fgetxattr, SYSCNR_fgetxattr)
IMPLEMENT_syscall(SYSCALL_listxattr, SYSCNR_listxattr)
IMPLEMENT_syscall(SYSCALL_llistxattr, SYSCNR_llistxattr)
IMPLEMENT_syscall(SYSCALL_flistxattr, SYSCNR_flistxattr)
IMPLEMENT_syscall(SYSCALL_removexattr, SYSCNR_removexattr)
IMPLEMENT_syscall(SYSCALL_lremovexattr, SYSCNR_lremovexattr)
IMPLEMENT_syscall(SYSCALL_fremovexattr, SYSCNR_fremovexattr)
IMPLEMENT_syscall(SYSCALL_tkill, SYSCNR_tkill)
IMPLEMENT_syscall(SYSCALL_time, SYSCNR_time)
IMPLEMENT_syscall(SYSCALL_futex, SYSCNR_futex)
IMPLEMENT_syscall(SYSCALL_sched_setaffinity, SYSCNR_sched_setaffinity)
IMPLEMENT_syscall(SYSCALL_sched_getaffinity, SYSCNR_sched_getaffinity)
IMPLEMENT_syscall(SYSCALL_set_thread_area, SYSCNR_set_thread_area)
IMPLEMENT_syscall(SYSCALL_io_setup, SYSCNR_io_setup)
IMPLEMENT_syscall(SYSCALL_io_destroy, SYSCNR_io_destroy)
IMPLEMENT_syscall(SYSCALL_io_getevents, SYSCNR_io_getevents)
IMPLEMENT_syscall(SYSCALL_io_submit, SYSCNR_io_submit)
IMPLEMENT_syscall(SYSCALL_io_cancel, SYSCNR_io_cancel)
IMPLEMENT_syscall(SYSCALL_get_thread_area, SYSCNR_get_thread_area)
IMPLEMENT_syscall(SYSCALL_lookup_dcookie, SYSCNR_lookup_dcookie)
IMPLEMENT_syscall(SYSCALL_epoll_create, SYSCNR_epoll_create)
IMPLEMENT_syscall(SYSCALL_epoll_ctl_old, SYSCNR_epoll_ctl_old)
IMPLEMENT_syscall(SYSCALL_epoll_wait_old, SYSCNR_epoll_wait_old)
IMPLEMENT_syscall(SYSCALL_remap_file_pages, SYSCNR_remap_file_pages)
IMPLEMENT_syscall(SYSCALL_getdents64, SYSCNR_getdents64)
IMPLEMENT_syscall(SYSCALL_set_tid_address, SYSCNR_set_tid_address)
IMPLEMENT_syscall(SYSCALL_restart_syscall, SYSCNR_restart_syscall)
IMPLEMENT_syscall(SYSCALL_semtimedop, SYSCNR_semtimedop)
IMPLEMENT_syscall(SYSCALL_fadvise64, SYSCNR_fadvise64)
IMPLEMENT_syscall(SYSCALL_timer_create, SYSCNR_timer_create)
IMPLEMENT_syscall(SYSCALL_timer_settime, SYSCNR_timer_settime)
IMPLEMENT_syscall(SYSCALL_timer_gettime, SYSCNR_timer_gettime)
IMPLEMENT_syscall(SYSCALL_timer_getoverrun, SYSCNR_timer_getoverrun)
IMPLEMENT_syscall(SYSCALL_timer_delete, SYSCNR_timer_delete)
IMPLEMENT_syscall(SYSCALL_clock_settime, SYSCNR_clock_settime)
IMPLEMENT_syscall(SYSCALL_clock_gettime, SYSCNR_clock_gettime)
IMPLEMENT_syscall(SYSCALL_clock_getres, SYSCNR_clock_getres)
IMPLEMENT_syscall(SYSCALL_clock_nanosleep, SYSCNR_clock_nanosleep)
IMPLEMENT_syscall(SYSCALL_exit_group, SYSCNR_exit_group)
IMPLEMENT_syscall(SYSCALL_epoll_wait, SYSCNR_epoll_wait)
IMPLEMENT_syscall(SYSCALL_epoll_ctl, SYSCNR_epoll_ctl)
IMPLEMENT_syscall(SYSCALL_tgkill, SYSCNR_tgkill)
IMPLEMENT_syscall(SYSCALL_utimes, SYSCNR_utimes)
IMPLEMENT_syscall(SYSCALL_vserver, SYSCNR_vserver)
IMPLEMENT_syscall(SYSCALL_mbind, SYSCNR_mbind)
IMPLEMENT_syscall(SYSCALL_set_mempolicy, SYSCNR_set_mempolicy)
IMPLEMENT_syscall(SYSCALL_get_mempolicy, SYSCNR_get_mempolicy)
IMPLEMENT_syscall(SYSCALL_mq_open, SYSCNR_mq_open)
IMPLEMENT_syscall(SYSCALL_mq_unlink, SYSCNR_mq_unlink)
IMPLEMENT_syscall(SYSCALL_mq_timedsend, SYSCNR_mq_timedsend)
IMPLEMENT_syscall(SYSCALL_mq_timedreceive, SYSCNR_mq_timedreceive)
IMPLEMENT_syscall(SYSCALL_mq_notify, SYSCNR_mq_notify)
IMPLEMENT_syscall(SYSCALL_mq_getsetattr, SYSCNR_mq_getsetattr)
IMPLEMENT_syscall(SYSCALL_kexec_load, SYSCNR_kexec_load)
IMPLEMENT_syscall(SYSCALL_waitid, SYSCNR_waitid)
IMPLEMENT_syscall(SYSCALL_add_key, SYSCNR_add_key)
IMPLEMENT_syscall(SYSCALL_request_key, SYSCNR_request_key)
IMPLEMENT_syscall(SYSCALL_keyctl, SYSCNR_keyctl)
IMPLEMENT_syscall(SYSCALL_ioprio_set, SYSCNR_ioprio_set)
IMPLEMENT_syscall(SYSCALL_ioprio_get, SYSCNR_ioprio_get)
IMPLEMENT_syscall(SYSCALL_inotify_init, SYSCNR_inotify_init)
IMPLEMENT_syscall(SYSCALL_inotify_add_watch, SYSCNR_inotify_add_watch)
IMPLEMENT_syscall(SYSCALL_inotify_rm_watch, SYSCNR_inotify_rm_watch)
IMPLEMENT_syscall(SYSCALL_migrate_pages, SYSCNR_migrate_pages)
IMPLEMENT_syscall(SYSCALL_openat, SYSCNR_openat)
IMPLEMENT_syscall(SYSCALL_mkdirat, SYSCNR_mkdirat)
IMPLEMENT_syscall(SYSCALL_mknodat, SYSCNR_mknodat)
IMPLEMENT_syscall(SYSCALL_fchownat, SYSCNR_fchownat)
IMPLEMENT_syscall(SYSCALL_futimesat, SYSCNR_futimesat)
IMPLEMENT_syscall(SYSCALL_newfstatat, SYSCNR_newfstatat)
IMPLEMENT_syscall(SYSCALL_unlinkat, SYSCNR_unlinkat)
IMPLEMENT_syscall(SYSCALL_renameat, SYSCNR_renameat)
IMPLEMENT_syscall(SYSCALL_linkat, SYSCNR_linkat)
IMPLEMENT_syscall(SYSCALL_symlinkat, SYSCNR_symlinkat)
IMPLEMENT_syscall(SYSCALL_readlinkat, SYSCNR_readlinkat)
IMPLEMENT_syscall(SYSCALL_fchmodat, SYSCNR_fchmodat)
IMPLEMENT_syscall(SYSCALL_faccessat, SYSCNR_faccessat)
IMPLEMENT_syscall(SYSCALL_pselect6, SYSCNR_pselect6)
IMPLEMENT_syscall(SYSCALL_ppoll, SYSCNR_ppoll)
IMPLEMENT_syscall(SYSCALL_unshare, SYSCNR_unshare)
IMPLEMENT_syscall(SYSCALL_set_robust_list, SYSCNR_set_robust_list)
IMPLEMENT_syscall(SYSCALL_get_robust_list, SYSCNR_get_robust_list)
IMPLEMENT_syscall(SYSCALL_splice, SYSCNR_splice)
IMPLEMENT_syscall(SYSCALL_tee, SYSCNR_tee)
IMPLEMENT_syscall(SYSCALL_sync_file_range, SYSCNR_sync_file_range)
IMPLEMENT_syscall(SYSCALL_vmsplice, SYSCNR_vmsplice)
IMPLEMENT_syscall(SYSCALL_move_pages, SYSCNR_move_pages)
IMPLEMENT_syscall(SYSCALL_utimensat, SYSCNR_utimensat)
IMPLEMENT_syscall(SYSCALL_epoll_pwait, SYSCNR_epoll_pwait)
IMPLEMENT_syscall(SYSCALL_signalfd, SYSCNR_signalfd)
IMPLEMENT_syscall(SYSCALL_timerfd_create, SYSCNR_timerfd_create)
IMPLEMENT_syscall(SYSCALL_eventfd, SYSCNR_eventfd)
IMPLEMENT_syscall(SYSCALL_fallocate, SYSCNR_fallocate)
IMPLEMENT_syscall(SYSCALL_timerfd_settime, SYSCNR_timerfd_settime)
IMPLEMENT_syscall(SYSCALL_timerfd_gettime, SYSCNR_timerfd_gettime)
IMPLEMENT_syscall(SYSCALL_accept4, SYSCNR_accept4)
IMPLEMENT_syscall(SYSCALL_signalfd4, SYSCNR_signalfd4)
IMPLEMENT_syscall(SYSCALL_eventfd2, SYSCNR_eventfd2)
IMPLEMENT_syscall(SYSCALL_epoll_create1, SYSCNR_epoll_create1)
IMPLEMENT_syscall(SYSCALL_dup3, SYSCNR_dup3)
IMPLEMENT_syscall(SYSCALL_pipe2, SYSCNR_pipe2)
IMPLEMENT_syscall(SYSCALL_inotify_init1, SYSCNR_inotify_init1)
IMPLEMENT_syscall(SYSCALL_preadv, SYSCNR_preadv)
IMPLEMENT_syscall(SYSCALL_pwritev, SYSCNR_pwritev)
IMPLEMENT_syscall(SYSCALL_rt_tgsigqueueinfo, SYSCNR_rt_tgsigqueueinfo)
IMPLEMENT_syscall(SYSCALL_perf_event_open, SYSCNR_perf_event_open)
IMPLEMENT_syscall(SYSCALL_recvmmsg, SYSCNR_recvmmsg)
IMPLEMENT_syscall(SYSCALL_fanotify_init, SYSCNR_fanotify_init)
IMPLEMENT_syscall(SYSCALL_fanotify_mark, SYSCNR_fanotify_mark)
IMPLEMENT_syscall(SYSCALL_prlimit64, SYSCNR_prlimit64)
IMPLEMENT_syscall(SYSCALL_name_to_handle_at, SYSCNR_name_to_handle_at)
IMPLEMENT_syscall(SYSCALL_open_by_handle_at, SYSCNR_open_by_handle_at)
IMPLEMENT_syscall(SYSCALL_clock_adjtime, SYSCNR_clock_adjtime)
IMPLEMENT_syscall(SYSCALL_syncfs, SYSCNR_syncfs)
IMPLEMENT_syscall(SYSCALL_sendmmsg, SYSCNR_sendmmsg)
IMPLEMENT_syscall(SYSCALL_setns, SYSCNR_setns)
IMPLEMENT_syscall(SYSCALL_getcpu, SYSCNR_getcpu)
IMPLEMENT_syscall(SYSCALL_process_vm_readv, SYSCNR_process_vm_readv)
IMPLEMENT_syscall(SYSCALL_process_vm_writev, SYSCNR_process_vm_writev)
IMPLEMENT_syscall(SYSCALL_kcmp, SYSCNR_kcmp)
IMPLEMENT_syscall(SYSCALL_finit_module, SYSCNR_finit_module)
IMPLEMENT_syscall(SYSCALL_sched_setattr, SYSCNR_sched_setattr)
IMPLEMENT_syscall(SYSCALL_sched_getattr, SYSCNR_sched_getattr)
IMPLEMENT_syscall(SYSCALL_renameat2, SYSCNR_renameat2)
IMPLEMENT_syscall(SYSCALL_seccomp, SYSCNR_seccomp)
IMPLEMENT_syscall(SYSCALL_getrandom, SYSCNR_getrandom)
IMPLEMENT_syscall(SYSCALL_memfd_create, SYSCNR_memfd_create)
IMPLEMENT_syscall(SYSCALL_kexec_file_load, SYSCNR_kexec_file_load)
IMPLEMENT_syscall(SYSCALL_bpf, SYSCNR_bpf)
IMPLEMENT_syscall(SYSCALL_execveat, SYSCNR_execveat)
IMPLEMENT_syscall(SYSCALL_userfaultfd, SYSCNR_userfaultfd)
IMPLEMENT_syscall(SYSCALL_membarrier, SYSCNR_membarrier)
IMPLEMENT_syscall(SYSCALL_mlock2, SYSCNR_mlock2)
IMPLEMENT_syscall(SYSCALL_copy_file_range, SYSCNR_copy_file_range)
IMPLEMENT_syscall(SYSCALL_preadv2, SYSCNR_preadv2)
IMPLEMENT_syscall(SYSCALL_pwritev2, SYSCNR_pwritev2)
IMPLEMENT_syscall(SYSCALL_pkey_mprotect, SYSCNR_pkey_mprotect)
IMPLEMENT_syscall(SYSCALL_pkey_alloc, SYSCNR_pkey_alloc)
IMPLEMENT_syscall(SYSCALL_pkey_free, SYSCNR_pkey_free)
IMPLEMENT_syscall(SYSCALL_statx, SYSCNR_statx)
#define SYSCNR_read 0
#define SYSCNR_write 1
#define SYSCNR_open 2
#define SYSCNR_close 3
#define SYSCNR_stat 4
#define SYSCNR_fstat 5
#define SYSCNR_lstat 6
#define SYSCNR_poll 7
#define SYSCNR_lseek 8
#define SYSCNR_mmap 9
#define SYSCNR_mprotect 10
#define SYSCNR_munmap 11
#define SYSCNR_brk 12
#define SYSCNR_rt_sigaction 13
#define SYSCNR_rt_sigprocmask 14
#define SYSCNR_rt_sigreturn 15
#define SYSCNR_ioctl 16
#define SYSCNR_pread64 17
#define SYSCNR_pwrite64 18
#define SYSCNR_readv 19
#define SYSCNR_writev 20
#define SYSCNR_access 21
#define SYSCNR_pipe 22
#define SYSCNR_select 23
#define SYSCNR_sched_yield 24
#define SYSCNR_mremap 25
#define SYSCNR_msync 26
#define SYSCNR_mincore 27
#define SYSCNR_madvise 28
#define SYSCNR_shmget 29
#define SYSCNR_shmat 30
#define SYSCNR_shmctl 31
#define SYSCNR_dup 32
#define SYSCNR_dup2 33
#define SYSCNR_pause 34
#define SYSCNR_nanosleep 35
#define SYSCNR_getitimer 36
#define SYSCNR_alarm 37
#define SYSCNR_setitimer 38
#define SYSCNR_getpid 39
#define SYSCNR_sendfile 40
#define SYSCNR_socket 41
#define SYSCNR_connect 42
#define SYSCNR_accept 43
#define SYSCNR_sendto 44
#define SYSCNR_recvfrom 45
#define SYSCNR_sendmsg 46
#define SYSCNR_recvmsg 47
#define SYSCNR_shutdown 48
#define SYSCNR_bind 49
#define SYSCNR_listen 50
#define SYSCNR_getsockname 51
#define SYSCNR_getpeername 52
#define SYSCNR_socketpair 53
#define SYSCNR_setsockopt 54
#define SYSCNR_getsockopt 55
#define SYSCNR_clone 56
#define SYSCNR_fork 57
#define SYSCNR_vfork 58
#define SYSCNR_execve 59
#define SYSCNR_exit 60
#define SYSCNR_wait4 61
#define SYSCNR_kill 62
#define SYSCNR_uname 63
#define SYSCNR_semget 64
#define SYSCNR_semop 65
#define SYSCNR_semctl 66
#define SYSCNR_shmdt 67
#define SYSCNR_msgget 68
#define SYSCNR_msgsnd 69
#define SYSCNR_msgrcv 70
#define SYSCNR_msgctl 71
#define SYSCNR_fcntl 72
#define SYSCNR_flock 73
#define SYSCNR_fsync 74
#define SYSCNR_fdatasync 75
#define SYSCNR_truncate 76
#define SYSCNR_ftruncate 77
#define SYSCNR_getdents 78
#define SYSCNR_getcwd 79
#define SYSCNR_chdir 80
#define SYSCNR_fchdir 81
#define SYSCNR_rename 82
#define SYSCNR_mkdir 83
#define SYSCNR_rmdir 84
#define SYSCNR_creat 85
#define SYSCNR_link 86
#define SYSCNR_unlink 87
#define SYSCNR_symlink 88
#define SYSCNR_readlink 89
#define SYSCNR_chmod 90
#define SYSCNR_fchmod 91
#define SYSCNR_chown 92
#define SYSCNR_fchown 93
#define SYSCNR_lchown 94
#define SYSCNR_umask 95
#define SYSCNR_gettimeofday 96
#define SYSCNR_getrlimit 97
#define SYSCNR_getrusage 98
#define SYSCNR_sysinfo 99
#define SYSCNR_times 100
#define SYSCNR_ptrace 101
#define SYSCNR_getuid 102
#define SYSCNR_syslog 103
#define SYSCNR_getgid 104
#define SYSCNR_setuid 105
#define SYSCNR_setgid 106
#define SYSCNR_geteuid 107
#define SYSCNR_getegid 108
#define SYSCNR_setpgid 109
#define SYSCNR_getppid 110
#define SYSCNR_getpgrp 111
#define SYSCNR_setsid 112
#define SYSCNR_setreuid 113
#define SYSCNR_setregid 114
#define SYSCNR_getgroups 115
#define SYSCNR_setgroups 116
#define SYSCNR_setresuid 117
#define SYSCNR_getresuid 118
#define SYSCNR_setresgid 119
#define SYSCNR_getresgid 120
#define SYSCNR_getpgid 121
#define SYSCNR_setfsuid 122
#define SYSCNR_setfsgid 123
#define SYSCNR_getsid 124
#define SYSCNR_capget 125
#define SYSCNR_capset 126
#define SYSCNR_rt_sigpending 127
#define SYSCNR_rt_sigtimedwait 128
#define SYSCNR_rt_sigqueueinfo 129
#define SYSCNR_rt_sigsuspend 130
#define SYSCNR_sigaltstack 131
#define SYSCNR_utime 132
#define SYSCNR_mknod 133
#define SYSCNR_uselib 134
#define SYSCNR_personality 135
#define SYSCNR_ustat 136
#define SYSCNR_statfs 137
#define SYSCNR_fstatfs 138
#define SYSCNR_sysfs 139
#define SYSCNR_getpriority 140
#define SYSCNR_setpriority 141
#define SYSCNR_sched_setparam 142
#define SYSCNR_sched_getparam 143
#define SYSCNR_sched_setscheduler 144
#define SYSCNR_sched_getscheduler 145
#define SYSCNR_sched_get_priority_max 146
#define SYSCNR_sched_get_priority_min 147
#define SYSCNR_sched_rr_get_interval 148
#define SYSCNR_mlock 149
#define SYSCNR_munlock 150
#define SYSCNR_mlockall 151
#define SYSCNR_munlockall 152
#define SYSCNR_vhangup 153
#define SYSCNR_modify_ldt 154
#define SYSCNR_pivot_root 155
#define SYSCNR__sysctl 156
#define SYSCNR_prctl 157
#define SYSCNR_arch_prctl 158
#define SYSCNR_adjtimex 159
#define SYSCNR_setrlimit 160
#define SYSCNR_chroot 161
#define SYSCNR_sync 162
#define SYSCNR_acct 163
#define SYSCNR_settimeofday 164
#define SYSCNR_mount 165
#define SYSCNR_umount2 166
#define SYSCNR_swapon 167
#define SYSCNR_swapoff 168
#define SYSCNR_reboot 169
#define SYSCNR_sethostname 170
#define SYSCNR_setdomainname 171
#define SYSCNR_iopl 172
#define SYSCNR_ioperm 173
#define SYSCNR_create_module 174
#define SYSCNR_init_module 175
#define SYSCNR_delete_module 176
#define SYSCNR_get_kernel_syms 177
#define SYSCNR_query_module 178
#define SYSCNR_quotactl 179
#define SYSCNR_nfsservctl 180
#define SYSCNR_getpmsg 181
#define SYSCNR_putpmsg 182
#define SYSCNR_afs_syscall 183
#define SYSCNR_tuxcall 184
#define SYSCNR_security 185
#define SYSCNR_gettid 186
#define SYSCNR_readahead 187
#define SYSCNR_setxattr 188
#define SYSCNR_lsetxattr 189
#define SYSCNR_fsetxattr 190
#define SYSCNR_getxattr 191
#define SYSCNR_lgetxattr 192
#define SYSCNR_fgetxattr 193
#define SYSCNR_listxattr 194
#define SYSCNR_llistxattr 195
#define SYSCNR_flistxattr 196
#define SYSCNR_removexattr 197
#define SYSCNR_lremovexattr 198
#define SYSCNR_fremovexattr 199
#define SYSCNR_tkill 200
#define SYSCNR_time 201
#define SYSCNR_futex 202
#define SYSCNR_sched_setaffinity 203
#define SYSCNR_sched_getaffinity 204
#define SYSCNR_set_thread_area 205
#define SYSCNR_io_setup 206
#define SYSCNR_io_destroy 207
#define SYSCNR_io_getevents 208
#define SYSCNR_io_submit 209
#define SYSCNR_io_cancel 210
#define SYSCNR_get_thread_area 211
#define SYSCNR_lookup_dcookie 212
#define SYSCNR_epoll_create 213
#define SYSCNR_epoll_ctl_old 214
#define SYSCNR_epoll_wait_old 215
#define SYSCNR_remap_file_pages 216
#define SYSCNR_getdents64 217
#define SYSCNR_set_tid_address 218
#define SYSCNR_restart_syscall 219
#define SYSCNR_semtimedop 220
#define SYSCNR_fadvise64 221
#define SYSCNR_timer_create 222
#define SYSCNR_timer_settime 223
#define SYSCNR_timer_gettime 224
#define SYSCNR_timer_getoverrun 225
#define SYSCNR_timer_delete 226
#define SYSCNR_clock_settime 227
#define SYSCNR_clock_gettime 228
#define SYSCNR_clock_getres 229
#define SYSCNR_clock_nanosleep 230
#define SYSCNR_exit_group 231
#define SYSCNR_epoll_wait 232
#define SYSCNR_epoll_ctl 233
#define SYSCNR_tgkill 234
#define SYSCNR_utimes 235
#define SYSCNR_vserver 236
#define SYSCNR_mbind 237
#define SYSCNR_set_mempolicy 238
#define SYSCNR_get_mempolicy 239
#define SYSCNR_mq_open 240
#define SYSCNR_mq_unlink 241
#define SYSCNR_mq_timedsend 242
#define SYSCNR_mq_timedreceive 243
#define SYSCNR_mq_notify 244
#define SYSCNR_mq_getsetattr 245
#define SYSCNR_kexec_load 246
#define SYSCNR_waitid 247
#define SYSCNR_add_key 248
#define SYSCNR_request_key 249
#define SYSCNR_keyctl 250
#define SYSCNR_ioprio_set 251
#define SYSCNR_ioprio_get 252
#define SYSCNR_inotify_init 253
#define SYSCNR_inotify_add_watch 254
#define SYSCNR_inotify_rm_watch 255
#define SYSCNR_migrate_pages 256
#define SYSCNR_openat 257
#define SYSCNR_mkdirat 258
#define SYSCNR_mknodat 259
#define SYSCNR_fchownat 260
#define SYSCNR_futimesat 261
#define SYSCNR_newfstatat 262
#define SYSCNR_unlinkat 263
#define SYSCNR_renameat 264
#define SYSCNR_linkat 265
#define SYSCNR_symlinkat 266
#define SYSCNR_readlinkat 267
#define SYSCNR_fchmodat 268
#define SYSCNR_faccessat 269
#define SYSCNR_pselect6 270
#define SYSCNR_ppoll 271
#define SYSCNR_unshare 272
#define SYSCNR_set_robust_list 273
#define SYSCNR_get_robust_list 274
#define SYSCNR_splice 275
#define SYSCNR_tee 276
#define SYSCNR_sync_file_range 277
#define SYSCNR_vmsplice 278
#define SYSCNR_move_pages 279
#define SYSCNR_utimensat 280
#define SYSCNR_epoll_pwait 281
#define SYSCNR_signalfd 282
#define SYSCNR_timerfd_create 283
#define SYSCNR_eventfd 284
#define SYSCNR_fallocate 285
#define SYSCNR_timerfd_settime 286
#define SYSCNR_timerfd_gettime 287
#define SYSCNR_accept4 288
#define SYSCNR_signalfd4 289
#define SYSCNR_eventfd2 290
#define SYSCNR_epoll_create1 291
#define SYSCNR_dup3 292
#define SYSCNR_pipe2 293
#define SYSCNR_inotify_init1 294
#define SYSCNR_preadv 295
#define SYSCNR_pwritev 296
#define SYSCNR_rt_tgsigqueueinfo 297
#define SYSCNR_perf_event_open 298
#define SYSCNR_recvmmsg 299
#define SYSCNR_fanotify_init 300
#define SYSCNR_fanotify_mark 301
#define SYSCNR_prlimit64 302
#define SYSCNR_name_to_handle_at 303
#define SYSCNR_open_by_handle_at 304
#define SYSCNR_clock_adjtime 305
#define SYSCNR_syncfs 306
#define SYSCNR_sendmmsg 307
#define SYSCNR_setns 308
#define SYSCNR_getcpu 309
#define SYSCNR_process_vm_readv 310
#define SYSCNR_process_vm_writev 311
#define SYSCNR_kcmp 312
#define SYSCNR_finit_module 313
#define SYSCNR_sched_setattr 314
#define SYSCNR_sched_getattr 315
#define SYSCNR_renameat2 316
#define SYSCNR_seccomp 317
#define SYSCNR_getrandom 318
#define SYSCNR_memfd_create 319
#define SYSCNR_kexec_file_load 320
#define SYSCNR_bpf 321
#define SYSCNR_execveat 322
#define SYSCNR_userfaultfd 323
#define SYSCNR_membarrier 324
#define SYSCNR_mlock2 325
#define SYSCNR_copy_file_range 326
#define SYSCNR_preadv2 327
#define SYSCNR_pwritev2 328
#define SYSCNR_pkey_mprotect 329
#define SYSCNR_pkey_alloc 330
#define SYSCNR_pkey_free 331
#define SYSCNR_statx 332
#define SYSCALL_ZERO_ARGS(nr) \
movq nrr, SYSC_NRR; \
syscall;
#define SYSCALL_ONE_ARGS(nrr, ag0) \
movq nrr, SYSC_NRR; \
movq ag0, SYSC_AG0; \
syscall;
#define SYSCALL_TWO_ARGS(nrr, ag0, ag1) \
movq nrr, SYSC_NRR; \
movq ag0, SYSC_AG0; \
movq ag1, SYSC_AG1; \
syscall;
#define SYSCALL_THREE_ARGS(nrr, ag0, ag1, ag2) \
movq nrr, SYSC_NRR; \
movq ag0, SYSC_AG0; \
movq ag1, SYSC_AG1; \
movq ag2, SYSC_AG2; \
syscall;
#define SYSCALL_FOUR_ARGS(nrr, ag0, ag1, ag2, ag3) \
movq nrr, SYSC_NRR; \
movq ag0, SYSC_AG0; \
movq ag1, SYSC_AG1; \
movq ag2, SYSC_AG2; \
movq ag3, SYSC_AG3; \
syscall;
#define SYSCALL_FIVE_ARGS(nrr, ag0, ag1, ag2, ag3, ag4) \
movq nrr, SYSC_NRR; \
movq ag0, SYSC_AG0; \
movq ag1, SYSC_AG1; \
movq ag2, SYSC_AG2; \
movq ag3, SYSC_AG3; \
movq ag4, SYSC_AG4; \
syscall;
#define SYSCALL_SIX_ARGS(nrr, ag0, ag1, ag2, ag3, ag4, ag5) \
movq nrr, SYSC_NRR; \
movq ag0, SYSC_AG0; \
movq ag1, SYSC_AG1; \
movq ag2, SYSC_AG2; \
movq ag3, SYSC_AG3; \
movq ag4, SYSC_AG4; \
movq ag5, SYSC_AG5; \
syscall;
#define IMPLEMENT_syscall(name, nr) \
name: \
movq CABI_AGQ3, SYSC_AGQ3; \
movq $nr , SYSC_NREG; \
syscall; \
ret;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment