Merge "x86_64: libm fixes"
diff --git a/libc/Android.mk b/libc/Android.mk
index f685565..4f8debd 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -80,11 +80,9 @@
bionic/err.c \
bionic/ether_aton.c \
bionic/ether_ntoa.c \
- bionic/fcntl.c \
bionic/fdprintf.c \
bionic/flockfile.c \
bionic/fork.c \
- bionic/fstatfs.c \
bionic/ftime.c \
bionic/ftok.c \
bionic/fts.c \
@@ -133,9 +131,7 @@
bionic/signal.c \
bionic/signame.c \
bionic/sigsetmask.c \
- bionic/sigsuspend.c \
bionic/sleep.c \
- bionic/statfs.c \
bionic/strndup.c \
bionic/strntoimax.c \
bionic/strntoumax.c \
@@ -180,6 +176,16 @@
netbsd/nameser/ns_print.c \
netbsd/nameser/ns_samedomain.c \
+# These are shared by all the 32-bit targets, but not the 64-bit ones.
+ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
+libc_common_src_files += \
+ bionic/fcntl.c \
+ bionic/fstatfs.c \
+ bionic/sigsuspend.c \
+ bionic/statfs.c \
+
+endif
+
# Fortify implementations of libc functions.
libc_common_src_files += \
bionic/__fgets_chk.cpp \
@@ -214,7 +220,6 @@
bionic/libc_init_common.cpp \
bionic/libc_logging.cpp \
bionic/libgen.cpp \
- bionic/mmap.cpp \
bionic/pthread_attr.cpp \
bionic/pthread_detach.cpp \
bionic/pthread_equal.cpp \
@@ -246,6 +251,13 @@
bionic/wait.cpp \
bionic/wchar.cpp \
+# These are shared by all the 32-bit targets, but not the 64-bit ones.
+ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),arm mips x86))
+libc_bionic_src_files += \
+ bionic/mmap.cpp \
+
+endif
+
libc_tzcode_src_files := \
tzcode/asctime.c \
tzcode/difftime.c \
@@ -360,39 +372,41 @@
upstream-netbsd/libc/string/strxfrm.c \
upstream-netbsd/libc/unistd/killpg.c \
+
# Architecture specific source files go here
# =========================================================
ifeq ($(TARGET_ARCH),arm)
libc_common_src_files += \
- bionic/memmove.c.arm \
- string/bcopy.c \
- string/strncmp.c \
- string/strncat.c \
- string/strncpy.c \
- bionic/strchr.cpp \
- string/strrchr.c \
bionic/memchr.c \
+ bionic/memmove.c.arm \
bionic/memrchr.c \
- string/index.c \
+ bionic/strchr.cpp \
bionic/strnlen.c \
+ string/bcopy.c \
+ string/index.c \
string/strlcat.c \
string/strlcpy.c \
+ string/strncat.c \
+ string/strncmp.c \
+ string/strncpy.c \
+ string/strrchr.c \
+ upstream-freebsd/lib/libc/string/wcscat.c \
upstream-freebsd/lib/libc/string/wcschr.c \
- upstream-freebsd/lib/libc/string/wcsrchr.c \
upstream-freebsd/lib/libc/string/wcscmp.c \
upstream-freebsd/lib/libc/string/wcscpy.c \
- upstream-freebsd/lib/libc/string/wmemcmp.c \
upstream-freebsd/lib/libc/string/wcslen.c \
- upstream-freebsd/lib/libc/string/wcscat.c
+ upstream-freebsd/lib/libc/string/wcsrchr.c \
+ upstream-freebsd/lib/libc/string/wmemcmp.c \
# These files need to be arm so that gdbserver
# can set breakpoints in them without messing
# up any thumb code.
+# TODO: is this actually necessary?
libc_common_src_files += \
- bionic/pthread-atfork.c.arm \
- bionic/pthread-rwlocks.c.arm \
- bionic/pthread-timers.c.arm \
- bionic/ptrace.c.arm
+ bionic/pthread-atfork.c.arm \
+ bionic/pthread-rwlocks.c.arm \
+ bionic/pthread-timers.c.arm \
+ bionic/ptrace.c.arm \
libc_static_common_src_files += \
bionic/pthread.c.arm \
@@ -415,31 +429,72 @@
endif # x86
+ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64))
+libc_common_src_files += \
+ bionic/memchr.c \
+ bionic/memcmp.c \
+ bionic/memcpy.c \
+ bionic/memmove.c \
+ bionic/memrchr.c \
+ bionic/memset.c \
+ bionic/pthread-atfork.c \
+ bionic/pthread-rwlocks.c \
+ bionic/pthread-timers.c \
+ bionic/ptrace.c \
+ bionic/strchr.cpp \
+ bionic/strnlen.c \
+ string/bcopy.c \
+ string/index.c \
+ string/strcat.c \
+ string/strcmp.c \
+ string/strcpy.c \
+ string/strlcat.c \
+ string/strlcpy.c \
+ string/strlen.c \
+ string/strncat.c \
+ string/strncmp.c \
+ string/strncpy.c \
+ string/strrchr.c \
+ upstream-freebsd/lib/libc/string/wcscat.c \
+ upstream-freebsd/lib/libc/string/wcschr.c \
+ upstream-freebsd/lib/libc/string/wcscmp.c \
+ upstream-freebsd/lib/libc/string/wcscpy.c \
+ upstream-freebsd/lib/libc/string/wcslen.c \
+ upstream-freebsd/lib/libc/string/wcsrchr.c \
+ upstream-freebsd/lib/libc/string/wmemcmp.c \
+
+libc_static_common_src_files += \
+ bionic/pthread.c \
+ bionic/pthread_create.cpp \
+ bionic/pthread_key.cpp \
+
+endif # x86_64
+
ifeq ($(TARGET_ARCH),mips)
libc_common_src_files += \
+ bionic/memchr.c \
bionic/memcmp.c \
+ bionic/memrchr.c \
+ bionic/strchr.cpp \
+ bionic/strnlen.c \
string/bcopy.c \
+ string/index.c \
+ string/strcat.c \
string/strcmp.c \
string/strcpy.c \
- string/strncmp.c \
- string/strcat.c \
- string/strncat.c \
- string/strncpy.c \
- bionic/strchr.cpp \
- string/strrchr.c \
- bionic/memchr.c \
- bionic/memrchr.c \
- string/index.c \
- bionic/strnlen.c \
string/strlcat.c \
string/strlcpy.c \
+ string/strncat.c \
+ string/strncmp.c \
+ string/strncpy.c \
+ string/strrchr.c \
+ upstream-freebsd/lib/libc/string/wcscat.c
upstream-freebsd/lib/libc/string/wcschr.c \
- upstream-freebsd/lib/libc/string/wcsrchr.c \
upstream-freebsd/lib/libc/string/wcscmp.c \
upstream-freebsd/lib/libc/string/wcscpy.c \
- upstream-freebsd/lib/libc/string/wmemcmp.c \
upstream-freebsd/lib/libc/string/wcslen.c \
- upstream-freebsd/lib/libc/string/wcscat.c
+ upstream-freebsd/lib/libc/string/wcsrchr.c \
+ upstream-freebsd/lib/libc/string/wmemcmp.c \
libc_common_src_files += \
bionic/pthread-atfork.c \
@@ -516,16 +571,23 @@
endif # !arm
ifeq ($(TARGET_ARCH),x86)
- libc_common_cflags += -DSOFTFLOAT
libc_crt_target_cflags := -m32
libc_crt_target_ldflags := -melf_i386
+endif
+ifeq ($(TARGET_ARCH),x86_64)
+ libc_crt_target_cflags := -m64
+ libc_crt_target_ldflags := -melf_x86_64
+endif
+
+ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
+ libc_common_cflags += -DSOFTFLOAT
ifeq ($(ARCH_X86_HAVE_SSE2),true)
libc_crt_target_cflags += -DUSE_SSE2=1
endif
ifeq ($(ARCH_X86_HAVE_SSSE3),true)
libc_crt_target_cflags += -DUSE_SSSE3=1
endif
-endif # x86
+endif
ifeq ($(TARGET_ARCH),mips)
ifneq ($(ARCH_MIPS_HAS_FPU),true)
@@ -581,7 +643,7 @@
ifeq ($(TARGET_ARCH),mips)
libc_crt_target_so_cflags := -fPIC
endif
-ifeq ($(TARGET_ARCH),x86)
+ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
libc_crt_target_so_cflags := -fPIC
endif
libc_crt_target_so_cflags += $(libc_crt_target_cflags)
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 86b164a..6465de4 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -6,7 +6,7 @@
#
# where:
# arch_list ::= "all" | "custom" | arch+
-# arch ::= "arm" | "mips" | "x86"
+# arch ::= "arm" | "mips" | "x86" | "x86_64"
#
# Note:
# - syscall_name corresponds to the name of the syscall, which may differ from
@@ -40,60 +40,61 @@
int execve(const char*, char* const*, char* const*) all
int __setuid:setuid32(uid_t) arm,x86
-int __setuid:setuid(uid_t) mips
+int __setuid:setuid(uid_t) mips,x86_64
uid_t getuid:getuid32() arm,x86
-uid_t getuid:getuid() mips
+uid_t getuid:getuid() mips,x86_64
gid_t getgid:getgid32() arm,x86
-gid_t getgid:getgid() mips
+gid_t getgid:getgid() mips,x86_64
uid_t geteuid:geteuid32() arm,x86
-uid_t geteuid:geteuid() mips
+uid_t geteuid:geteuid() mips,x86_64
gid_t getegid:getegid32() arm,x86
-gid_t getegid:getegid() mips
+gid_t getegid:getegid() mips,x86_64
uid_t getresuid:getresuid32(uid_t* ruid, uid_t* euid, uid_t* suid) arm,x86
-uid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) mips
+uid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) mips,x86_64
gid_t getresgid:getresgid32(gid_t* rgid, gid_t* egid, gid_t* sgid) arm,x86
-gid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) mips
+gid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) mips,x86_64
pid_t gettid() all
ssize_t readahead(int, off64_t, size_t) all
int getgroups:getgroups32(int, gid_t*) arm,x86
-int getgroups:getgroups(int, gid_t*) mips
+int getgroups:getgroups(int, gid_t*) mips,x86_64
pid_t getpgid(pid_t) all
pid_t getppid() all
pid_t getsid(pid_t) all
pid_t setsid() all
int setgid:setgid32(gid_t) arm,x86
-int setgid:setgid(gid_t) mips
+int setgid:setgid(gid_t) mips,x86_64
int seteuid:seteuid32(uid_t) custom
int __setreuid:setreuid32(uid_t, uid_t) arm,x86
-int __setreuid:setreuid(uid_t, uid_t) mips
+int __setreuid:setreuid(uid_t, uid_t) mips,x86_64
int __setresuid:setresuid32(uid_t, uid_t, uid_t) arm,x86
-int __setresuid:setresuid(uid_t, uid_t, uid_t) mips
+int __setresuid:setresuid(uid_t, uid_t, uid_t) mips,x86_64
int setresgid:setresgid32(gid_t, gid_t, gid_t) arm,x86
-int setresgid:setresgid(gid_t, gid_t, gid_t) mips
+int setresgid:setresgid(gid_t, gid_t, gid_t) mips,x86_64
void* __brk:brk(void*) all
# See comments in kill.S to understand why we don't generate ARM stubs for kill/tkill/tgkill.
-int kill(pid_t, int) mips,x86
-int tkill(pid_t tid, int sig) mips,x86
-int tgkill(pid_t tgid, pid_t tid, int sig) mips,x86
+int kill(pid_t, int) mips,x86,x86_64
+int tkill(pid_t tid, int sig) mips,x86,x86_64
+int tgkill(pid_t tgid, pid_t tid, int sig) mips,x86,x86_64
int __ptrace:ptrace(int request, int pid, void* addr, void* data) all
int __set_thread_area:set_thread_area(void* user_desc) mips,x86
int __getpriority:getpriority(int, int) all
int setpriority(int, int, int) all
int setrlimit(int resource, const struct rlimit* rlp) all
int getrlimit:ugetrlimit(int resource, struct rlimit* rlp) arm,x86
-int getrlimit:getrlimit(int resource, struct rlimit* rlp) mips
+int getrlimit:getrlimit(int resource, struct rlimit* rlp) mips,x86_64
int getrusage(int who, struct rusage* r_usage) all
int setgroups:setgroups32(int, const gid_t*) arm,x86
-int setgroups:setgroups(int, const gid_t*) mips
+int setgroups:setgroups(int, const gid_t*) mips,x86_64
pid_t getpgrp(void) custom
int setpgid(pid_t, pid_t) all
-pid_t vfork(void) arm
+pid_t vfork(void) arm,x86_64
int setregid:setregid32(gid_t, gid_t) arm,x86
-int setregid:setregid(gid_t, gid_t) mips
+int setregid:setregid(gid_t, gid_t) mips,x86_64
int chroot(const char*) all
# IMPORTANT: Even though <sys/prctl.h> declares prctl(int, ...), the syscall stub must take 6 arguments
# to match the kernel implementation.
int prctl(int option, unsigned int arg2, unsigned int arg3, unsigned int arg4, unsigned int arg5) all
+long arch_prctl(int, unsigned long) x86_64
int capget(cap_user_header_t header, cap_user_data_t data) all
int capset(cap_user_header_t header, const cap_user_data_t data) all
int sigaltstack(const stack_t*, stack_t*) all
@@ -109,10 +110,10 @@
int close(int) all
int creat(const char*, mode_t) custom
off_t lseek(int, off_t, int) all
-int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) all
+int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,x86,mips
pid_t getpid() all
-void* mmap(void*, size_t, int, int, int, long) custom
-void* __mmap2:mmap2(void*, size_t, int, int, int, long) all
+void* mmap(void*, size_t, int, int, int, long) x86_64
+void* __mmap2:mmap2(void*, size_t, int, int, int, long) arm,x86,mips
int munmap(void*, size_t) all
void* mremap(void*, size_t, size_t, unsigned long) all
int msync(const void*, size_t, int) all
@@ -126,27 +127,30 @@
int __ioctl:ioctl(int, int, void*) all
int readv(int, const struct iovec*, int) all
int writev(int, const struct iovec*, int) all
-int __fcntl:fcntl(int, int, void*) all
+int __fcntl:fcntl(int, int, void*) arm,x86,mips
+int fcntl(int, void*) x86_64
int flock(int, int) all
int fchmod(int, mode_t) all
int dup(int) all
-int pipe(int*) arm,x86
+int pipe(int*) arm,x86,x86_64
int pipe2(int*, int) all
int dup2(int, int) all
-int select:_newselect(int, struct fd_set*, struct fd_set*, struct fd_set*, struct timeval*) all
+int select:_newselect(int, struct fd_set*, struct fd_set*, struct fd_set*, struct timeval*) arm,x86,mips
+int select(int, struct fd_set*, struct fd_set*, struct fd_set*, struct timeval*) x86_64
int ftruncate(int, off_t) all
-int ftruncate64(int, off64_t) all
+int ftruncate64(int, off64_t) arm,x86,mips
int getdents:getdents64(unsigned int, struct dirent*, unsigned int) all
int fsync(int) all
int fdatasync(int) all
int fchown:fchown32(int, uid_t, gid_t) arm,x86
-int fchown:fchown(int, uid_t, gid_t) mips
+int fchown:fchown(int, uid_t, gid_t) mips,x86_64
void sync(void) all
-int __fcntl64:fcntl64(int, int, void*) all
-int __fstatfs64:fstatfs64(int, size_t, struct statfs*) all
+int __fcntl64:fcntl64(int, int, void*) arm,x86,mips
+int __fstatfs64:fstatfs64(int, size_t, struct statfs*) arm,x86,mips
+int fstatfs(int, struct statfs*) x86_64
ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) all
-ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) all
-int fstatat:fstatat64(int dirfd, const char* path, struct stat* buf, int flags) all
+ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) arm,x86,mips
+int fstatat:fstatat64(int dirfd, const char* path, struct stat* buf, int flags) arm,x86,mips
int mkdirat(int dirfd, const char* pathname, mode_t mode) all
int fchownat(int dirfd, const char* path, uid_t owner, gid_t group, int flags) all
int fchmodat(int dirfd, const char* path, mode_t mode, int flags) all
@@ -164,15 +168,18 @@
int mknod(const char*, mode_t, dev_t) all
int chmod(const char*, mode_t) all
int chown:chown32(const char*, uid_t, gid_t) arm,x86
-int chown:chown(const char*, uid_t, gid_t) mips
+int chown:chown(const char*, uid_t, gid_t) mips,x86_64
int lchown:lchown32(const char*, uid_t, gid_t) arm,x86
-int lchown:lchown(const char*, uid_t, gid_t) mips
+int lchown:lchown(const char*, uid_t, gid_t) mips,x86_64
int mount(const char*, const char*, const char*, unsigned long, const void*) all
int umount(const char*) custom
int umount2(const char*, int) all
-int fstat:fstat64(int, struct stat*) all
-int stat:stat64(const char*, struct stat*) all
-int lstat:lstat64(const char*, struct stat*) all
+int fstat:fstat64(int, struct stat*) arm,x86,mips
+int fstat(int, struct stat*) x86_64
+int stat:stat64(const char*, struct stat*) arm,x86,mips
+int stat(const char*, struct stat*) x86_64
+int lstat:lstat64(const char*, struct stat*) arm,x86,mips
+int lstat(const char*, struct stat*) x86_64
int mkdir(const char*, mode_t) all
int readlink(const char*, char*, size_t) all
int rmdir(const char*) all
@@ -183,7 +190,7 @@
int symlink(const char*, const char*) all
int fchdir(int) all
int truncate(const char*, off_t) all
-int truncate64(const char*, off64_t) all
+int truncate64(const char*, off64_t) arm,x86,mips
int setxattr(const char*, const char*, const void*, size_t, int) all
int lsetxattr(const char*, const char*, const void*, size_t, int) all
ssize_t getxattr(const char*, const char*, void*, size_t) all
@@ -192,7 +199,8 @@
ssize_t llistxattr(const char*, char*, size_t) all
int removexattr(const char*, const char*) all
int lremovexattr(const char*, const char*) all
-int __statfs64:statfs64(const char*, size_t, struct statfs*) all
+int __statfs64:statfs64(const char*, size_t, struct statfs*) arm,x86,mips
+int statfs(const char*, struct statfs*) x86_64
long unshare(unsigned long) all
int swapon(const char*, int) all
int swapoff(const char*) all
@@ -221,32 +229,33 @@
int timerfd_gettime(int, struct itimerspec*) all
# signals
-int sigaction(int, const struct sigaction*, struct sigaction*) all
-int sigprocmask(int, const sigset_t*, sigset_t*) all
+int sigaction(int, const struct sigaction*, struct sigaction*) arm,x86,mips
+int sigprocmask(int, const sigset_t*, sigset_t*) arm,x86,mips
int __sigsuspend:sigsuspend(int unused1, int unused2, unsigned mask) arm,x86
int __sigsuspend:sigsuspend(const sigset_t* mask) mips
+int __rt_sigsuspend:rt_sigsuspend(const sigset_t *unewset, size_t sigset_size) x86_64
int __rt_sigaction:rt_sigaction(int sig, const struct sigaction* act, struct sigaction* oact, size_t sigsetsize) all
int __rt_sigprocmask:rt_sigprocmask(int how, const sigset_t* set, sigset_t* oset, size_t sigsetsize) all
int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t* set, struct siginfo_t* info, struct timespec_t* timeout, size_t sigset_size) all
-int sigpending(sigset_t*) all
+int sigpending(sigset_t*) arm,x86,mips
int signalfd4(int fd, const sigset_t* mask, size_t sizemask, int flags) all
# sockets
-int socket(int, int, int) arm,mips
-int socketpair(int, int, int, int*) arm,mips
-int bind(int, struct sockaddr*, int) arm,mips
-int connect(int, struct sockaddr*, socklen_t) arm,mips
-int listen(int, int) arm,mips
-int accept(int, struct sockaddr*, socklen_t*) arm,mips
-int getsockname(int, struct sockaddr*, socklen_t*) arm,mips
-int getpeername(int, struct sockaddr*, socklen_t*) arm,mips
-int sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,mips
-int recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,mips
-int shutdown(int, int) arm,mips
-int setsockopt(int, int, int, const void*, socklen_t) arm,mips
-int getsockopt(int, int, int, void*, socklen_t*) arm,mips
-int sendmsg(int, const struct msghdr*, unsigned int) arm,mips
-int recvmsg(int, struct msghdr*, unsigned int) arm,mips
+int socket(int, int, int) arm,mips,x86_64
+int socketpair(int, int, int, int*) arm,mips,x86_64
+int bind(int, struct sockaddr*, int) arm,mips,x86_64
+int connect(int, struct sockaddr*, socklen_t) arm,mips,x86_64
+int listen(int, int) arm,mips,x86_64
+int accept(int, struct sockaddr*, socklen_t*) arm,mips,x86_64
+int getsockname(int, struct sockaddr*, socklen_t*) arm,mips,x86_64
+int getpeername(int, struct sockaddr*, socklen_t*) arm,mips,x86_64
+int sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,mips,x86_64
+int recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,mips,x86_64
+int shutdown(int, int) arm,mips,x86_64
+int setsockopt(int, int, int, const void*, socklen_t) arm,mips,x86_64
+int getsockopt(int, int, int, void*, socklen_t*) arm,mips,x86_64
+int sendmsg(int, const struct msghdr*, unsigned int) arm,mips,x86_64
+int recvmsg(int, struct msghdr*, unsigned int) arm,mips,x86_64
# sockets for x86. These are done as an "indexed" call to socketcall syscall.
int socket:socketcall:1(int, int, int) x86
diff --git a/libc/arch-x86/syscalls/__brk.S b/libc/arch-x86/syscalls/__brk.S
index b26e187..e3e8bfd 100644
--- a/libc/arch-x86/syscalls/__brk.S
+++ b/libc/arch-x86/syscalls/__brk.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__brk)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__fcntl.S b/libc/arch-x86/syscalls/__fcntl.S
index 328df24..3492b3b 100644
--- a/libc/arch-x86/syscalls/__fcntl.S
+++ b/libc/arch-x86/syscalls/__fcntl.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__fcntl)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__fcntl64.S b/libc/arch-x86/syscalls/__fcntl64.S
index b0fb981..0fc5f21 100644
--- a/libc/arch-x86/syscalls/__fcntl64.S
+++ b/libc/arch-x86/syscalls/__fcntl64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__fcntl64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__fork.S b/libc/arch-x86/syscalls/__fork.S
index 98e00c8..1a20645 100644
--- a/libc/arch-x86/syscalls/__fork.S
+++ b/libc/arch-x86/syscalls/__fork.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__fork)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__fstatfs64.S b/libc/arch-x86/syscalls/__fstatfs64.S
index aeb6863..1e3487f 100644
--- a/libc/arch-x86/syscalls/__fstatfs64.S
+++ b/libc/arch-x86/syscalls/__fstatfs64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__fstatfs64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__getcpu.S b/libc/arch-x86/syscalls/__getcpu.S
index f50782c..159acfc 100644
--- a/libc/arch-x86/syscalls/__getcpu.S
+++ b/libc/arch-x86/syscalls/__getcpu.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__getcpu)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__getcwd.S b/libc/arch-x86/syscalls/__getcwd.S
index 9337342..5479dbf 100644
--- a/libc/arch-x86/syscalls/__getcwd.S
+++ b/libc/arch-x86/syscalls/__getcwd.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__getcwd)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__getpriority.S b/libc/arch-x86/syscalls/__getpriority.S
index 60fa3bb..5d67dbc 100644
--- a/libc/arch-x86/syscalls/__getpriority.S
+++ b/libc/arch-x86/syscalls/__getpriority.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__getpriority)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__ioctl.S b/libc/arch-x86/syscalls/__ioctl.S
index 0e8d189..485d0eb 100644
--- a/libc/arch-x86/syscalls/__ioctl.S
+++ b/libc/arch-x86/syscalls/__ioctl.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__ioctl)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__llseek.S b/libc/arch-x86/syscalls/__llseek.S
index b347886..1f1721e 100644
--- a/libc/arch-x86/syscalls/__llseek.S
+++ b/libc/arch-x86/syscalls/__llseek.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__llseek)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__mmap2.S b/libc/arch-x86/syscalls/__mmap2.S
index 010a989..f97ec38 100644
--- a/libc/arch-x86/syscalls/__mmap2.S
+++ b/libc/arch-x86/syscalls/__mmap2.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__mmap2)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__open.S b/libc/arch-x86/syscalls/__open.S
index 87cda45..f386cae 100644
--- a/libc/arch-x86/syscalls/__open.S
+++ b/libc/arch-x86/syscalls/__open.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__open)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__openat.S b/libc/arch-x86/syscalls/__openat.S
index 31db1dc..335bf3c 100644
--- a/libc/arch-x86/syscalls/__openat.S
+++ b/libc/arch-x86/syscalls/__openat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__openat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__ptrace.S b/libc/arch-x86/syscalls/__ptrace.S
index 1f143cc..ff376a4 100644
--- a/libc/arch-x86/syscalls/__ptrace.S
+++ b/libc/arch-x86/syscalls/__ptrace.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__ptrace)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__reboot.S b/libc/arch-x86/syscalls/__reboot.S
index a32e8a8..cd6ef55 100644
--- a/libc/arch-x86/syscalls/__reboot.S
+++ b/libc/arch-x86/syscalls/__reboot.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__reboot)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__rt_sigaction.S b/libc/arch-x86/syscalls/__rt_sigaction.S
index 957bca1..7eeb922 100644
--- a/libc/arch-x86/syscalls/__rt_sigaction.S
+++ b/libc/arch-x86/syscalls/__rt_sigaction.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__rt_sigaction)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__rt_sigprocmask.S b/libc/arch-x86/syscalls/__rt_sigprocmask.S
index a23e079..111943d 100644
--- a/libc/arch-x86/syscalls/__rt_sigprocmask.S
+++ b/libc/arch-x86/syscalls/__rt_sigprocmask.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__rt_sigprocmask)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__rt_sigtimedwait.S b/libc/arch-x86/syscalls/__rt_sigtimedwait.S
index cf2b2a2..0e23113 100644
--- a/libc/arch-x86/syscalls/__rt_sigtimedwait.S
+++ b/libc/arch-x86/syscalls/__rt_sigtimedwait.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__rt_sigtimedwait)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__sched_getaffinity.S b/libc/arch-x86/syscalls/__sched_getaffinity.S
index da9f08a..5293efd 100644
--- a/libc/arch-x86/syscalls/__sched_getaffinity.S
+++ b/libc/arch-x86/syscalls/__sched_getaffinity.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__sched_getaffinity)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__set_thread_area.S b/libc/arch-x86/syscalls/__set_thread_area.S
index 37f41d0..95f1a5f 100644
--- a/libc/arch-x86/syscalls/__set_thread_area.S
+++ b/libc/arch-x86/syscalls/__set_thread_area.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__set_thread_area)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__setresuid.S b/libc/arch-x86/syscalls/__setresuid.S
index c16d2fb..537c897 100644
--- a/libc/arch-x86/syscalls/__setresuid.S
+++ b/libc/arch-x86/syscalls/__setresuid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__setresuid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__setreuid.S b/libc/arch-x86/syscalls/__setreuid.S
index 2ba521d..bc6cd25 100644
--- a/libc/arch-x86/syscalls/__setreuid.S
+++ b/libc/arch-x86/syscalls/__setreuid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__setreuid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__setuid.S b/libc/arch-x86/syscalls/__setuid.S
index 092ceb0..5a5ff6d 100644
--- a/libc/arch-x86/syscalls/__setuid.S
+++ b/libc/arch-x86/syscalls/__setuid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__setuid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__sigsuspend.S b/libc/arch-x86/syscalls/__sigsuspend.S
index c69665f..6a5c6aa 100644
--- a/libc/arch-x86/syscalls/__sigsuspend.S
+++ b/libc/arch-x86/syscalls/__sigsuspend.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__sigsuspend)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__statfs64.S b/libc/arch-x86/syscalls/__statfs64.S
index 58785ad..f909cda 100644
--- a/libc/arch-x86/syscalls/__statfs64.S
+++ b/libc/arch-x86/syscalls/__statfs64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__statfs64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__sys_clone.S b/libc/arch-x86/syscalls/__sys_clone.S
index 17e7c3b..2a61970 100644
--- a/libc/arch-x86/syscalls/__sys_clone.S
+++ b/libc/arch-x86/syscalls/__sys_clone.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__sys_clone)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__syslog.S b/libc/arch-x86/syscalls/__syslog.S
index 1216d75..2672790 100644
--- a/libc/arch-x86/syscalls/__syslog.S
+++ b/libc/arch-x86/syscalls/__syslog.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__syslog)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__timer_create.S b/libc/arch-x86/syscalls/__timer_create.S
index 1817afc..7bb27ca 100644
--- a/libc/arch-x86/syscalls/__timer_create.S
+++ b/libc/arch-x86/syscalls/__timer_create.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__timer_create)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__timer_delete.S b/libc/arch-x86/syscalls/__timer_delete.S
index 1472a99..9b7ef37 100644
--- a/libc/arch-x86/syscalls/__timer_delete.S
+++ b/libc/arch-x86/syscalls/__timer_delete.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__timer_delete)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__timer_getoverrun.S b/libc/arch-x86/syscalls/__timer_getoverrun.S
index 2204682..e3fb9bb 100644
--- a/libc/arch-x86/syscalls/__timer_getoverrun.S
+++ b/libc/arch-x86/syscalls/__timer_getoverrun.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__timer_getoverrun)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__timer_gettime.S b/libc/arch-x86/syscalls/__timer_gettime.S
index e45e4ef..e409b43 100644
--- a/libc/arch-x86/syscalls/__timer_gettime.S
+++ b/libc/arch-x86/syscalls/__timer_gettime.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__timer_gettime)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__timer_settime.S b/libc/arch-x86/syscalls/__timer_settime.S
index 71a9182..00078e7 100644
--- a/libc/arch-x86/syscalls/__timer_settime.S
+++ b/libc/arch-x86/syscalls/__timer_settime.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__timer_settime)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/__waitid.S b/libc/arch-x86/syscalls/__waitid.S
index 2588b26..65b86fc 100644
--- a/libc/arch-x86/syscalls/__waitid.S
+++ b/libc/arch-x86/syscalls/__waitid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(__waitid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/_exit.S b/libc/arch-x86/syscalls/_exit.S
index 9ce3e71..1c43c75 100644
--- a/libc/arch-x86/syscalls/_exit.S
+++ b/libc/arch-x86/syscalls/_exit.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(_exit)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/_exit_thread.S b/libc/arch-x86/syscalls/_exit_thread.S
index cc12916..e05abca 100644
--- a/libc/arch-x86/syscalls/_exit_thread.S
+++ b/libc/arch-x86/syscalls/_exit_thread.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(_exit_thread)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/_waitpid.S b/libc/arch-x86/syscalls/_waitpid.S
index 8ed7898..d2486d5 100644
--- a/libc/arch-x86/syscalls/_waitpid.S
+++ b/libc/arch-x86/syscalls/_waitpid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(_waitpid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/accept.S b/libc/arch-x86/syscalls/accept.S
index 5678205..6183a08 100644
--- a/libc/arch-x86/syscalls/accept.S
+++ b/libc/arch-x86/syscalls/accept.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(accept)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/access.S b/libc/arch-x86/syscalls/access.S
index a21ec43..50bb47b 100644
--- a/libc/arch-x86/syscalls/access.S
+++ b/libc/arch-x86/syscalls/access.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(access)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/acct.S b/libc/arch-x86/syscalls/acct.S
index d5d2a1a..713c288 100644
--- a/libc/arch-x86/syscalls/acct.S
+++ b/libc/arch-x86/syscalls/acct.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(acct)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/bind.S b/libc/arch-x86/syscalls/bind.S
index 77a4f12..3c6e1bd 100644
--- a/libc/arch-x86/syscalls/bind.S
+++ b/libc/arch-x86/syscalls/bind.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(bind)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/capget.S b/libc/arch-x86/syscalls/capget.S
index f563ce6..69bff27 100644
--- a/libc/arch-x86/syscalls/capget.S
+++ b/libc/arch-x86/syscalls/capget.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(capget)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/capset.S b/libc/arch-x86/syscalls/capset.S
index 7ab426b..0d92ff6 100644
--- a/libc/arch-x86/syscalls/capset.S
+++ b/libc/arch-x86/syscalls/capset.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(capset)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/chdir.S b/libc/arch-x86/syscalls/chdir.S
index bab9614..b408329 100644
--- a/libc/arch-x86/syscalls/chdir.S
+++ b/libc/arch-x86/syscalls/chdir.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(chdir)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/chmod.S b/libc/arch-x86/syscalls/chmod.S
index a3d22c7..348fc7e 100644
--- a/libc/arch-x86/syscalls/chmod.S
+++ b/libc/arch-x86/syscalls/chmod.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(chmod)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/chown.S b/libc/arch-x86/syscalls/chown.S
index 48c2b23..d33e4c7 100644
--- a/libc/arch-x86/syscalls/chown.S
+++ b/libc/arch-x86/syscalls/chown.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(chown)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/chroot.S b/libc/arch-x86/syscalls/chroot.S
index ea640e6..66d47b1 100644
--- a/libc/arch-x86/syscalls/chroot.S
+++ b/libc/arch-x86/syscalls/chroot.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(chroot)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/clock_getres.S b/libc/arch-x86/syscalls/clock_getres.S
index 806b7e4..003e8f6 100644
--- a/libc/arch-x86/syscalls/clock_getres.S
+++ b/libc/arch-x86/syscalls/clock_getres.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(clock_getres)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/clock_gettime.S b/libc/arch-x86/syscalls/clock_gettime.S
index 2f87d12..64b852b 100644
--- a/libc/arch-x86/syscalls/clock_gettime.S
+++ b/libc/arch-x86/syscalls/clock_gettime.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(clock_gettime)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/clock_nanosleep.S b/libc/arch-x86/syscalls/clock_nanosleep.S
index d691301..1090a4a 100644
--- a/libc/arch-x86/syscalls/clock_nanosleep.S
+++ b/libc/arch-x86/syscalls/clock_nanosleep.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(clock_nanosleep)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/clock_settime.S b/libc/arch-x86/syscalls/clock_settime.S
index a13b20a..f4595e7 100644
--- a/libc/arch-x86/syscalls/clock_settime.S
+++ b/libc/arch-x86/syscalls/clock_settime.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(clock_settime)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/close.S b/libc/arch-x86/syscalls/close.S
index 0e80403..93fb7b5 100644
--- a/libc/arch-x86/syscalls/close.S
+++ b/libc/arch-x86/syscalls/close.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(close)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/connect.S b/libc/arch-x86/syscalls/connect.S
index f55d31c..92dd853 100644
--- a/libc/arch-x86/syscalls/connect.S
+++ b/libc/arch-x86/syscalls/connect.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(connect)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/delete_module.S b/libc/arch-x86/syscalls/delete_module.S
index a319310..8957eb1 100644
--- a/libc/arch-x86/syscalls/delete_module.S
+++ b/libc/arch-x86/syscalls/delete_module.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(delete_module)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/dup.S b/libc/arch-x86/syscalls/dup.S
index 7304681..1ac329b 100644
--- a/libc/arch-x86/syscalls/dup.S
+++ b/libc/arch-x86/syscalls/dup.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(dup)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/dup2.S b/libc/arch-x86/syscalls/dup2.S
index d6cee81..3e0dd38 100644
--- a/libc/arch-x86/syscalls/dup2.S
+++ b/libc/arch-x86/syscalls/dup2.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(dup2)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/epoll_create.S b/libc/arch-x86/syscalls/epoll_create.S
index 061f173..4dae863 100644
--- a/libc/arch-x86/syscalls/epoll_create.S
+++ b/libc/arch-x86/syscalls/epoll_create.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(epoll_create)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/epoll_ctl.S b/libc/arch-x86/syscalls/epoll_ctl.S
index 5228da3..0a367f2 100644
--- a/libc/arch-x86/syscalls/epoll_ctl.S
+++ b/libc/arch-x86/syscalls/epoll_ctl.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(epoll_ctl)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/epoll_wait.S b/libc/arch-x86/syscalls/epoll_wait.S
index e395a5e..c1f30a6 100644
--- a/libc/arch-x86/syscalls/epoll_wait.S
+++ b/libc/arch-x86/syscalls/epoll_wait.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(epoll_wait)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/eventfd.S b/libc/arch-x86/syscalls/eventfd.S
index 4e96a7b..d74f628 100644
--- a/libc/arch-x86/syscalls/eventfd.S
+++ b/libc/arch-x86/syscalls/eventfd.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(eventfd)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/execve.S b/libc/arch-x86/syscalls/execve.S
index 3028e8f..117e71a 100644
--- a/libc/arch-x86/syscalls/execve.S
+++ b/libc/arch-x86/syscalls/execve.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(execve)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/faccessat.S b/libc/arch-x86/syscalls/faccessat.S
index c7c3b20..3aab3f3 100644
--- a/libc/arch-x86/syscalls/faccessat.S
+++ b/libc/arch-x86/syscalls/faccessat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(faccessat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fchdir.S b/libc/arch-x86/syscalls/fchdir.S
index 2d6a4fd..1aa07c7 100644
--- a/libc/arch-x86/syscalls/fchdir.S
+++ b/libc/arch-x86/syscalls/fchdir.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fchdir)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fchmod.S b/libc/arch-x86/syscalls/fchmod.S
index d1e2b1b..6ab69d9 100644
--- a/libc/arch-x86/syscalls/fchmod.S
+++ b/libc/arch-x86/syscalls/fchmod.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fchmod)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fchmodat.S b/libc/arch-x86/syscalls/fchmodat.S
index b46522b..9830895 100644
--- a/libc/arch-x86/syscalls/fchmodat.S
+++ b/libc/arch-x86/syscalls/fchmodat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fchmodat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fchown.S b/libc/arch-x86/syscalls/fchown.S
index d09f965..f12d047 100644
--- a/libc/arch-x86/syscalls/fchown.S
+++ b/libc/arch-x86/syscalls/fchown.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fchown)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fchownat.S b/libc/arch-x86/syscalls/fchownat.S
index ad958db..d87654d 100644
--- a/libc/arch-x86/syscalls/fchownat.S
+++ b/libc/arch-x86/syscalls/fchownat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fchownat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fdatasync.S b/libc/arch-x86/syscalls/fdatasync.S
index 7b912aa..9c340d7 100644
--- a/libc/arch-x86/syscalls/fdatasync.S
+++ b/libc/arch-x86/syscalls/fdatasync.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fdatasync)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fgetxattr.S b/libc/arch-x86/syscalls/fgetxattr.S
index e81c257..5eb5426 100644
--- a/libc/arch-x86/syscalls/fgetxattr.S
+++ b/libc/arch-x86/syscalls/fgetxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fgetxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/flistxattr.S b/libc/arch-x86/syscalls/flistxattr.S
index 2d398d1..1ffcbfc 100644
--- a/libc/arch-x86/syscalls/flistxattr.S
+++ b/libc/arch-x86/syscalls/flistxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(flistxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/flock.S b/libc/arch-x86/syscalls/flock.S
index cad1420..55cf6d7 100644
--- a/libc/arch-x86/syscalls/flock.S
+++ b/libc/arch-x86/syscalls/flock.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(flock)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fremovexattr.S b/libc/arch-x86/syscalls/fremovexattr.S
index 837efb8..8869a74 100644
--- a/libc/arch-x86/syscalls/fremovexattr.S
+++ b/libc/arch-x86/syscalls/fremovexattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fremovexattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fsetxattr.S b/libc/arch-x86/syscalls/fsetxattr.S
index ae0e0f8..4af3c61 100644
--- a/libc/arch-x86/syscalls/fsetxattr.S
+++ b/libc/arch-x86/syscalls/fsetxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fsetxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fstat.S b/libc/arch-x86/syscalls/fstat.S
index 4fd1d5a..8a6a5a7 100644
--- a/libc/arch-x86/syscalls/fstat.S
+++ b/libc/arch-x86/syscalls/fstat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fstat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fstatat.S b/libc/arch-x86/syscalls/fstatat.S
index f07b405..5dc6d34 100644
--- a/libc/arch-x86/syscalls/fstatat.S
+++ b/libc/arch-x86/syscalls/fstatat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fstatat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/fsync.S b/libc/arch-x86/syscalls/fsync.S
index f9e4bc3..6671c07 100644
--- a/libc/arch-x86/syscalls/fsync.S
+++ b/libc/arch-x86/syscalls/fsync.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(fsync)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/ftruncate.S b/libc/arch-x86/syscalls/ftruncate.S
index 9d27c14..36e1158 100644
--- a/libc/arch-x86/syscalls/ftruncate.S
+++ b/libc/arch-x86/syscalls/ftruncate.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(ftruncate)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/ftruncate64.S b/libc/arch-x86/syscalls/ftruncate64.S
index a121add..9b3f00e 100644
--- a/libc/arch-x86/syscalls/ftruncate64.S
+++ b/libc/arch-x86/syscalls/ftruncate64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(ftruncate64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/futex.S b/libc/arch-x86/syscalls/futex.S
index 7f0684f..f76a4dc 100644
--- a/libc/arch-x86/syscalls/futex.S
+++ b/libc/arch-x86/syscalls/futex.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(futex)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getdents.S b/libc/arch-x86/syscalls/getdents.S
index c17a5a7..ffd6019 100644
--- a/libc/arch-x86/syscalls/getdents.S
+++ b/libc/arch-x86/syscalls/getdents.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getdents)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getegid.S b/libc/arch-x86/syscalls/getegid.S
index 0f055e1..78bb02d 100644
--- a/libc/arch-x86/syscalls/getegid.S
+++ b/libc/arch-x86/syscalls/getegid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getegid)
movl $__NR_getegid32, %eax
diff --git a/libc/arch-x86/syscalls/geteuid.S b/libc/arch-x86/syscalls/geteuid.S
index a308137..b62ada1 100644
--- a/libc/arch-x86/syscalls/geteuid.S
+++ b/libc/arch-x86/syscalls/geteuid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(geteuid)
movl $__NR_geteuid32, %eax
diff --git a/libc/arch-x86/syscalls/getgid.S b/libc/arch-x86/syscalls/getgid.S
index 0b43991..2d20e62 100644
--- a/libc/arch-x86/syscalls/getgid.S
+++ b/libc/arch-x86/syscalls/getgid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getgid)
movl $__NR_getgid32, %eax
diff --git a/libc/arch-x86/syscalls/getgroups.S b/libc/arch-x86/syscalls/getgroups.S
index c92a692..e7a1ef5 100644
--- a/libc/arch-x86/syscalls/getgroups.S
+++ b/libc/arch-x86/syscalls/getgroups.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getgroups)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getitimer.S b/libc/arch-x86/syscalls/getitimer.S
index 04f01c0..56a2bbf 100644
--- a/libc/arch-x86/syscalls/getitimer.S
+++ b/libc/arch-x86/syscalls/getitimer.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getitimer)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getpeername.S b/libc/arch-x86/syscalls/getpeername.S
index 1a385ad..c94e1cf 100644
--- a/libc/arch-x86/syscalls/getpeername.S
+++ b/libc/arch-x86/syscalls/getpeername.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getpeername)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getpgid.S b/libc/arch-x86/syscalls/getpgid.S
index d1a8d26..98a5816 100644
--- a/libc/arch-x86/syscalls/getpgid.S
+++ b/libc/arch-x86/syscalls/getpgid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getpgid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getpid.S b/libc/arch-x86/syscalls/getpid.S
index f9e3613..15cbe48 100644
--- a/libc/arch-x86/syscalls/getpid.S
+++ b/libc/arch-x86/syscalls/getpid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getpid)
movl $__NR_getpid, %eax
diff --git a/libc/arch-x86/syscalls/getppid.S b/libc/arch-x86/syscalls/getppid.S
index afbc81a..5c5fcfc 100644
--- a/libc/arch-x86/syscalls/getppid.S
+++ b/libc/arch-x86/syscalls/getppid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getppid)
movl $__NR_getppid, %eax
diff --git a/libc/arch-x86/syscalls/getresgid.S b/libc/arch-x86/syscalls/getresgid.S
index c1adb5c..4cef66c 100644
--- a/libc/arch-x86/syscalls/getresgid.S
+++ b/libc/arch-x86/syscalls/getresgid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getresgid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getresuid.S b/libc/arch-x86/syscalls/getresuid.S
index 4bbf637..039d188 100644
--- a/libc/arch-x86/syscalls/getresuid.S
+++ b/libc/arch-x86/syscalls/getresuid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getresuid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getrlimit.S b/libc/arch-x86/syscalls/getrlimit.S
index 09b2fd5..3cfbfb7 100644
--- a/libc/arch-x86/syscalls/getrlimit.S
+++ b/libc/arch-x86/syscalls/getrlimit.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getrlimit)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getrusage.S b/libc/arch-x86/syscalls/getrusage.S
index f180213..8bf1501 100644
--- a/libc/arch-x86/syscalls/getrusage.S
+++ b/libc/arch-x86/syscalls/getrusage.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getrusage)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getsid.S b/libc/arch-x86/syscalls/getsid.S
index 5b1a32f..e04f035 100644
--- a/libc/arch-x86/syscalls/getsid.S
+++ b/libc/arch-x86/syscalls/getsid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getsid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getsockname.S b/libc/arch-x86/syscalls/getsockname.S
index 9e7cec1..330e0ec 100644
--- a/libc/arch-x86/syscalls/getsockname.S
+++ b/libc/arch-x86/syscalls/getsockname.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getsockname)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getsockopt.S b/libc/arch-x86/syscalls/getsockopt.S
index c210749..931d715 100644
--- a/libc/arch-x86/syscalls/getsockopt.S
+++ b/libc/arch-x86/syscalls/getsockopt.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getsockopt)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/gettid.S b/libc/arch-x86/syscalls/gettid.S
index d14f320..a2cb813 100644
--- a/libc/arch-x86/syscalls/gettid.S
+++ b/libc/arch-x86/syscalls/gettid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(gettid)
movl $__NR_gettid, %eax
diff --git a/libc/arch-x86/syscalls/gettimeofday.S b/libc/arch-x86/syscalls/gettimeofday.S
index 2fa118d..bdffd67 100644
--- a/libc/arch-x86/syscalls/gettimeofday.S
+++ b/libc/arch-x86/syscalls/gettimeofday.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(gettimeofday)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/getuid.S b/libc/arch-x86/syscalls/getuid.S
index 08b9cce..ab44d51 100644
--- a/libc/arch-x86/syscalls/getuid.S
+++ b/libc/arch-x86/syscalls/getuid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getuid)
movl $__NR_getuid32, %eax
diff --git a/libc/arch-x86/syscalls/getxattr.S b/libc/arch-x86/syscalls/getxattr.S
index 64990ef..e99efa1 100644
--- a/libc/arch-x86/syscalls/getxattr.S
+++ b/libc/arch-x86/syscalls/getxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(getxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/init_module.S b/libc/arch-x86/syscalls/init_module.S
index 9d1daad..a006cff 100644
--- a/libc/arch-x86/syscalls/init_module.S
+++ b/libc/arch-x86/syscalls/init_module.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(init_module)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/inotify_add_watch.S b/libc/arch-x86/syscalls/inotify_add_watch.S
index fc9c087..5401e66 100644
--- a/libc/arch-x86/syscalls/inotify_add_watch.S
+++ b/libc/arch-x86/syscalls/inotify_add_watch.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(inotify_add_watch)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/inotify_init.S b/libc/arch-x86/syscalls/inotify_init.S
index ffc4a2a..254bc06 100644
--- a/libc/arch-x86/syscalls/inotify_init.S
+++ b/libc/arch-x86/syscalls/inotify_init.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(inotify_init)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/inotify_rm_watch.S b/libc/arch-x86/syscalls/inotify_rm_watch.S
index 08d208c..7b173f9 100644
--- a/libc/arch-x86/syscalls/inotify_rm_watch.S
+++ b/libc/arch-x86/syscalls/inotify_rm_watch.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(inotify_rm_watch)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/ioprio_get.S b/libc/arch-x86/syscalls/ioprio_get.S
index 63f1111..de356a6 100644
--- a/libc/arch-x86/syscalls/ioprio_get.S
+++ b/libc/arch-x86/syscalls/ioprio_get.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(ioprio_get)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/ioprio_set.S b/libc/arch-x86/syscalls/ioprio_set.S
index 2b4d87e..98dbf5d 100644
--- a/libc/arch-x86/syscalls/ioprio_set.S
+++ b/libc/arch-x86/syscalls/ioprio_set.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(ioprio_set)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/kill.S b/libc/arch-x86/syscalls/kill.S
index 260fe73..4153ef2 100644
--- a/libc/arch-x86/syscalls/kill.S
+++ b/libc/arch-x86/syscalls/kill.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(kill)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/klogctl.S b/libc/arch-x86/syscalls/klogctl.S
index 32db1af..a923fd7 100644
--- a/libc/arch-x86/syscalls/klogctl.S
+++ b/libc/arch-x86/syscalls/klogctl.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(klogctl)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/lchown.S b/libc/arch-x86/syscalls/lchown.S
index 9bd1c9a..9318a64 100644
--- a/libc/arch-x86/syscalls/lchown.S
+++ b/libc/arch-x86/syscalls/lchown.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(lchown)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/lgetxattr.S b/libc/arch-x86/syscalls/lgetxattr.S
index bb5a7ba..3fb0609 100644
--- a/libc/arch-x86/syscalls/lgetxattr.S
+++ b/libc/arch-x86/syscalls/lgetxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(lgetxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/link.S b/libc/arch-x86/syscalls/link.S
index 4419149..661adf9 100644
--- a/libc/arch-x86/syscalls/link.S
+++ b/libc/arch-x86/syscalls/link.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(link)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/listen.S b/libc/arch-x86/syscalls/listen.S
index 0c4d6b0..4eda67c 100644
--- a/libc/arch-x86/syscalls/listen.S
+++ b/libc/arch-x86/syscalls/listen.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(listen)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/listxattr.S b/libc/arch-x86/syscalls/listxattr.S
index 059c2aa..456f2dd 100644
--- a/libc/arch-x86/syscalls/listxattr.S
+++ b/libc/arch-x86/syscalls/listxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(listxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/llistxattr.S b/libc/arch-x86/syscalls/llistxattr.S
index a6023eb..5892afa 100644
--- a/libc/arch-x86/syscalls/llistxattr.S
+++ b/libc/arch-x86/syscalls/llistxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(llistxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/lremovexattr.S b/libc/arch-x86/syscalls/lremovexattr.S
index 2bfd91b..1a110ab 100644
--- a/libc/arch-x86/syscalls/lremovexattr.S
+++ b/libc/arch-x86/syscalls/lremovexattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(lremovexattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/lseek.S b/libc/arch-x86/syscalls/lseek.S
index d7b3b19..03d9ee7 100644
--- a/libc/arch-x86/syscalls/lseek.S
+++ b/libc/arch-x86/syscalls/lseek.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(lseek)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/lsetxattr.S b/libc/arch-x86/syscalls/lsetxattr.S
index 05790e7..4468df8 100644
--- a/libc/arch-x86/syscalls/lsetxattr.S
+++ b/libc/arch-x86/syscalls/lsetxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(lsetxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/lstat.S b/libc/arch-x86/syscalls/lstat.S
index 7b8187e..bae1089 100644
--- a/libc/arch-x86/syscalls/lstat.S
+++ b/libc/arch-x86/syscalls/lstat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(lstat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/madvise.S b/libc/arch-x86/syscalls/madvise.S
index bf8b518..8326429 100644
--- a/libc/arch-x86/syscalls/madvise.S
+++ b/libc/arch-x86/syscalls/madvise.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(madvise)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mincore.S b/libc/arch-x86/syscalls/mincore.S
index 42a612a..3229042 100644
--- a/libc/arch-x86/syscalls/mincore.S
+++ b/libc/arch-x86/syscalls/mincore.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mincore)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mkdir.S b/libc/arch-x86/syscalls/mkdir.S
index d8cdbd4..ce0707a 100644
--- a/libc/arch-x86/syscalls/mkdir.S
+++ b/libc/arch-x86/syscalls/mkdir.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mkdir)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mkdirat.S b/libc/arch-x86/syscalls/mkdirat.S
index 844a2b9..85d48aa 100644
--- a/libc/arch-x86/syscalls/mkdirat.S
+++ b/libc/arch-x86/syscalls/mkdirat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mkdirat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mknod.S b/libc/arch-x86/syscalls/mknod.S
index eebef21..5e1e7ad 100644
--- a/libc/arch-x86/syscalls/mknod.S
+++ b/libc/arch-x86/syscalls/mknod.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mknod)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mlock.S b/libc/arch-x86/syscalls/mlock.S
index 9c91682..8ee3b19 100644
--- a/libc/arch-x86/syscalls/mlock.S
+++ b/libc/arch-x86/syscalls/mlock.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mlock)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mlockall.S b/libc/arch-x86/syscalls/mlockall.S
index 6bf571b..253dc67 100644
--- a/libc/arch-x86/syscalls/mlockall.S
+++ b/libc/arch-x86/syscalls/mlockall.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mlockall)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mount.S b/libc/arch-x86/syscalls/mount.S
index 255f223..b5b7c8b 100644
--- a/libc/arch-x86/syscalls/mount.S
+++ b/libc/arch-x86/syscalls/mount.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mount)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mprotect.S b/libc/arch-x86/syscalls/mprotect.S
index c2b6a0f..db8ea5d 100644
--- a/libc/arch-x86/syscalls/mprotect.S
+++ b/libc/arch-x86/syscalls/mprotect.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mprotect)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/mremap.S b/libc/arch-x86/syscalls/mremap.S
index 6c366dc..d2868b4 100644
--- a/libc/arch-x86/syscalls/mremap.S
+++ b/libc/arch-x86/syscalls/mremap.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(mremap)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/msync.S b/libc/arch-x86/syscalls/msync.S
index 15b052d..b19741c 100644
--- a/libc/arch-x86/syscalls/msync.S
+++ b/libc/arch-x86/syscalls/msync.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(msync)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/munlock.S b/libc/arch-x86/syscalls/munlock.S
index 1c7db58..506538b 100644
--- a/libc/arch-x86/syscalls/munlock.S
+++ b/libc/arch-x86/syscalls/munlock.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(munlock)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/munlockall.S b/libc/arch-x86/syscalls/munlockall.S
index 9e38a91..940a11a 100644
--- a/libc/arch-x86/syscalls/munlockall.S
+++ b/libc/arch-x86/syscalls/munlockall.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(munlockall)
movl $__NR_munlockall, %eax
diff --git a/libc/arch-x86/syscalls/munmap.S b/libc/arch-x86/syscalls/munmap.S
index a62eb92..7fbb0bf 100644
--- a/libc/arch-x86/syscalls/munmap.S
+++ b/libc/arch-x86/syscalls/munmap.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(munmap)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/nanosleep.S b/libc/arch-x86/syscalls/nanosleep.S
index 8cf0d8f..fb834d2 100644
--- a/libc/arch-x86/syscalls/nanosleep.S
+++ b/libc/arch-x86/syscalls/nanosleep.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(nanosleep)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/pause.S b/libc/arch-x86/syscalls/pause.S
index ff9d76c..018208e 100644
--- a/libc/arch-x86/syscalls/pause.S
+++ b/libc/arch-x86/syscalls/pause.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(pause)
movl $__NR_pause, %eax
diff --git a/libc/arch-x86/syscalls/perf_event_open.S b/libc/arch-x86/syscalls/perf_event_open.S
index fa39a2a..353ae93 100644
--- a/libc/arch-x86/syscalls/perf_event_open.S
+++ b/libc/arch-x86/syscalls/perf_event_open.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(perf_event_open)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/personality.S b/libc/arch-x86/syscalls/personality.S
index 045f3de..00c048b 100644
--- a/libc/arch-x86/syscalls/personality.S
+++ b/libc/arch-x86/syscalls/personality.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(personality)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/pipe.S b/libc/arch-x86/syscalls/pipe.S
index b906e6d..10ecee1 100644
--- a/libc/arch-x86/syscalls/pipe.S
+++ b/libc/arch-x86/syscalls/pipe.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(pipe)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/pipe2.S b/libc/arch-x86/syscalls/pipe2.S
index bf3ccf6..eaa4c5a 100644
--- a/libc/arch-x86/syscalls/pipe2.S
+++ b/libc/arch-x86/syscalls/pipe2.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(pipe2)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/poll.S b/libc/arch-x86/syscalls/poll.S
index 3261857..4678292 100644
--- a/libc/arch-x86/syscalls/poll.S
+++ b/libc/arch-x86/syscalls/poll.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(poll)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/prctl.S b/libc/arch-x86/syscalls/prctl.S
index bcaf2d8..9fa9fbb 100644
--- a/libc/arch-x86/syscalls/prctl.S
+++ b/libc/arch-x86/syscalls/prctl.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(prctl)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/pread64.S b/libc/arch-x86/syscalls/pread64.S
index b9fcb54..6f79216 100644
--- a/libc/arch-x86/syscalls/pread64.S
+++ b/libc/arch-x86/syscalls/pread64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(pread64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/pwrite64.S b/libc/arch-x86/syscalls/pwrite64.S
index f689cc6..ca71e0a 100644
--- a/libc/arch-x86/syscalls/pwrite64.S
+++ b/libc/arch-x86/syscalls/pwrite64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(pwrite64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/read.S b/libc/arch-x86/syscalls/read.S
index bccc1bb..d817191 100644
--- a/libc/arch-x86/syscalls/read.S
+++ b/libc/arch-x86/syscalls/read.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(read)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/readahead.S b/libc/arch-x86/syscalls/readahead.S
index e72cc7a..0c51042 100644
--- a/libc/arch-x86/syscalls/readahead.S
+++ b/libc/arch-x86/syscalls/readahead.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(readahead)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/readlink.S b/libc/arch-x86/syscalls/readlink.S
index 7444728..298b58e 100644
--- a/libc/arch-x86/syscalls/readlink.S
+++ b/libc/arch-x86/syscalls/readlink.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(readlink)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/readv.S b/libc/arch-x86/syscalls/readv.S
index 6ff3002..ff8f15c 100644
--- a/libc/arch-x86/syscalls/readv.S
+++ b/libc/arch-x86/syscalls/readv.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(readv)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/recvfrom.S b/libc/arch-x86/syscalls/recvfrom.S
index f3d9d6a..fe42037 100644
--- a/libc/arch-x86/syscalls/recvfrom.S
+++ b/libc/arch-x86/syscalls/recvfrom.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(recvfrom)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/recvmsg.S b/libc/arch-x86/syscalls/recvmsg.S
index 9c4f9e2..da7a938 100644
--- a/libc/arch-x86/syscalls/recvmsg.S
+++ b/libc/arch-x86/syscalls/recvmsg.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(recvmsg)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/removexattr.S b/libc/arch-x86/syscalls/removexattr.S
index a086eb7..f61c1d2 100644
--- a/libc/arch-x86/syscalls/removexattr.S
+++ b/libc/arch-x86/syscalls/removexattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(removexattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/rename.S b/libc/arch-x86/syscalls/rename.S
index 9f40818..a3d2931 100644
--- a/libc/arch-x86/syscalls/rename.S
+++ b/libc/arch-x86/syscalls/rename.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(rename)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/renameat.S b/libc/arch-x86/syscalls/renameat.S
index e3ffe7b..f08d89d 100644
--- a/libc/arch-x86/syscalls/renameat.S
+++ b/libc/arch-x86/syscalls/renameat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(renameat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/rmdir.S b/libc/arch-x86/syscalls/rmdir.S
index 627c41a..e4cb7be 100644
--- a/libc/arch-x86/syscalls/rmdir.S
+++ b/libc/arch-x86/syscalls/rmdir.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(rmdir)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_get_priority_max.S b/libc/arch-x86/syscalls/sched_get_priority_max.S
index fb696cc..dd02198 100644
--- a/libc/arch-x86/syscalls/sched_get_priority_max.S
+++ b/libc/arch-x86/syscalls/sched_get_priority_max.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_get_priority_max)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_get_priority_min.S b/libc/arch-x86/syscalls/sched_get_priority_min.S
index f1884f1..4baddce 100644
--- a/libc/arch-x86/syscalls/sched_get_priority_min.S
+++ b/libc/arch-x86/syscalls/sched_get_priority_min.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_get_priority_min)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_getparam.S b/libc/arch-x86/syscalls/sched_getparam.S
index 0214c6c..bc54f24 100644
--- a/libc/arch-x86/syscalls/sched_getparam.S
+++ b/libc/arch-x86/syscalls/sched_getparam.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_getparam)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_getscheduler.S b/libc/arch-x86/syscalls/sched_getscheduler.S
index aaba953..d117a7b 100644
--- a/libc/arch-x86/syscalls/sched_getscheduler.S
+++ b/libc/arch-x86/syscalls/sched_getscheduler.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_getscheduler)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_rr_get_interval.S b/libc/arch-x86/syscalls/sched_rr_get_interval.S
index c2745c7..c6ca520 100644
--- a/libc/arch-x86/syscalls/sched_rr_get_interval.S
+++ b/libc/arch-x86/syscalls/sched_rr_get_interval.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_rr_get_interval)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_setaffinity.S b/libc/arch-x86/syscalls/sched_setaffinity.S
index 40f09f2..39dadb9 100644
--- a/libc/arch-x86/syscalls/sched_setaffinity.S
+++ b/libc/arch-x86/syscalls/sched_setaffinity.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_setaffinity)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_setparam.S b/libc/arch-x86/syscalls/sched_setparam.S
index b3c2c1f..d0700cd 100644
--- a/libc/arch-x86/syscalls/sched_setparam.S
+++ b/libc/arch-x86/syscalls/sched_setparam.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_setparam)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_setscheduler.S b/libc/arch-x86/syscalls/sched_setscheduler.S
index c57ed7b..ee3bd8e 100644
--- a/libc/arch-x86/syscalls/sched_setscheduler.S
+++ b/libc/arch-x86/syscalls/sched_setscheduler.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_setscheduler)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sched_yield.S b/libc/arch-x86/syscalls/sched_yield.S
index e40e2da..7bd58a8 100644
--- a/libc/arch-x86/syscalls/sched_yield.S
+++ b/libc/arch-x86/syscalls/sched_yield.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sched_yield)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/select.S b/libc/arch-x86/syscalls/select.S
index 1f19918..821ff4d 100644
--- a/libc/arch-x86/syscalls/select.S
+++ b/libc/arch-x86/syscalls/select.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(select)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sendfile.S b/libc/arch-x86/syscalls/sendfile.S
index fed0456..f85fb13 100644
--- a/libc/arch-x86/syscalls/sendfile.S
+++ b/libc/arch-x86/syscalls/sendfile.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sendfile)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sendfile64.S b/libc/arch-x86/syscalls/sendfile64.S
index 9731806..49b14f8 100644
--- a/libc/arch-x86/syscalls/sendfile64.S
+++ b/libc/arch-x86/syscalls/sendfile64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sendfile64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sendmsg.S b/libc/arch-x86/syscalls/sendmsg.S
index 9b9dee1..dd087ef 100644
--- a/libc/arch-x86/syscalls/sendmsg.S
+++ b/libc/arch-x86/syscalls/sendmsg.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sendmsg)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sendto.S b/libc/arch-x86/syscalls/sendto.S
index 315ed4c..9b820ff 100644
--- a/libc/arch-x86/syscalls/sendto.S
+++ b/libc/arch-x86/syscalls/sendto.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sendto)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setgid.S b/libc/arch-x86/syscalls/setgid.S
index 4704047..534f170 100644
--- a/libc/arch-x86/syscalls/setgid.S
+++ b/libc/arch-x86/syscalls/setgid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setgid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setgroups.S b/libc/arch-x86/syscalls/setgroups.S
index f55d84f..3c9e621 100644
--- a/libc/arch-x86/syscalls/setgroups.S
+++ b/libc/arch-x86/syscalls/setgroups.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setgroups)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setitimer.S b/libc/arch-x86/syscalls/setitimer.S
index 713c5c6..0da630e 100644
--- a/libc/arch-x86/syscalls/setitimer.S
+++ b/libc/arch-x86/syscalls/setitimer.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setitimer)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setpgid.S b/libc/arch-x86/syscalls/setpgid.S
index f90001a..ed388ab 100644
--- a/libc/arch-x86/syscalls/setpgid.S
+++ b/libc/arch-x86/syscalls/setpgid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setpgid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setpriority.S b/libc/arch-x86/syscalls/setpriority.S
index 973302e..5a32678 100644
--- a/libc/arch-x86/syscalls/setpriority.S
+++ b/libc/arch-x86/syscalls/setpriority.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setpriority)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setregid.S b/libc/arch-x86/syscalls/setregid.S
index 6842540..3d54ab4 100644
--- a/libc/arch-x86/syscalls/setregid.S
+++ b/libc/arch-x86/syscalls/setregid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setregid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setresgid.S b/libc/arch-x86/syscalls/setresgid.S
index ce598c1..ee1fb72 100644
--- a/libc/arch-x86/syscalls/setresgid.S
+++ b/libc/arch-x86/syscalls/setresgid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setresgid)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setrlimit.S b/libc/arch-x86/syscalls/setrlimit.S
index 0c11b75..ace57ac 100644
--- a/libc/arch-x86/syscalls/setrlimit.S
+++ b/libc/arch-x86/syscalls/setrlimit.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setrlimit)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setsid.S b/libc/arch-x86/syscalls/setsid.S
index 235b4fb..f26e95d 100644
--- a/libc/arch-x86/syscalls/setsid.S
+++ b/libc/arch-x86/syscalls/setsid.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setsid)
movl $__NR_setsid, %eax
diff --git a/libc/arch-x86/syscalls/setsockopt.S b/libc/arch-x86/syscalls/setsockopt.S
index 6219859..128b69e 100644
--- a/libc/arch-x86/syscalls/setsockopt.S
+++ b/libc/arch-x86/syscalls/setsockopt.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setsockopt)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/settimeofday.S b/libc/arch-x86/syscalls/settimeofday.S
index f06aee7..8d27b7d 100644
--- a/libc/arch-x86/syscalls/settimeofday.S
+++ b/libc/arch-x86/syscalls/settimeofday.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(settimeofday)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/setxattr.S b/libc/arch-x86/syscalls/setxattr.S
index f6110cc..0786530 100644
--- a/libc/arch-x86/syscalls/setxattr.S
+++ b/libc/arch-x86/syscalls/setxattr.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(setxattr)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/shutdown.S b/libc/arch-x86/syscalls/shutdown.S
index 997138c..456f7ab 100644
--- a/libc/arch-x86/syscalls/shutdown.S
+++ b/libc/arch-x86/syscalls/shutdown.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(shutdown)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sigaction.S b/libc/arch-x86/syscalls/sigaction.S
index 499c821..842f574 100644
--- a/libc/arch-x86/syscalls/sigaction.S
+++ b/libc/arch-x86/syscalls/sigaction.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sigaction)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sigaltstack.S b/libc/arch-x86/syscalls/sigaltstack.S
index 7cdd1eb..346ff07 100644
--- a/libc/arch-x86/syscalls/sigaltstack.S
+++ b/libc/arch-x86/syscalls/sigaltstack.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sigaltstack)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/signalfd4.S b/libc/arch-x86/syscalls/signalfd4.S
index 399ad35..0e9ed71 100644
--- a/libc/arch-x86/syscalls/signalfd4.S
+++ b/libc/arch-x86/syscalls/signalfd4.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(signalfd4)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sigpending.S b/libc/arch-x86/syscalls/sigpending.S
index e26f189..70c3ec4 100644
--- a/libc/arch-x86/syscalls/sigpending.S
+++ b/libc/arch-x86/syscalls/sigpending.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sigpending)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sigprocmask.S b/libc/arch-x86/syscalls/sigprocmask.S
index fb12ea2..0ac052e 100644
--- a/libc/arch-x86/syscalls/sigprocmask.S
+++ b/libc/arch-x86/syscalls/sigprocmask.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sigprocmask)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/socket.S b/libc/arch-x86/syscalls/socket.S
index b7a20de..d1bb6ac 100644
--- a/libc/arch-x86/syscalls/socket.S
+++ b/libc/arch-x86/syscalls/socket.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(socket)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/socketpair.S b/libc/arch-x86/syscalls/socketpair.S
index 02c02ac..14931f7 100644
--- a/libc/arch-x86/syscalls/socketpair.S
+++ b/libc/arch-x86/syscalls/socketpair.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(socketpair)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/stat.S b/libc/arch-x86/syscalls/stat.S
index 2cdf1a0..07cbbf4 100644
--- a/libc/arch-x86/syscalls/stat.S
+++ b/libc/arch-x86/syscalls/stat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(stat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/swapoff.S b/libc/arch-x86/syscalls/swapoff.S
index f2d6ddb..203e324 100644
--- a/libc/arch-x86/syscalls/swapoff.S
+++ b/libc/arch-x86/syscalls/swapoff.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(swapoff)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/swapon.S b/libc/arch-x86/syscalls/swapon.S
index 08602fb..b1b7c8c 100644
--- a/libc/arch-x86/syscalls/swapon.S
+++ b/libc/arch-x86/syscalls/swapon.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(swapon)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/symlink.S b/libc/arch-x86/syscalls/symlink.S
index 6c27dc1..d787593 100644
--- a/libc/arch-x86/syscalls/symlink.S
+++ b/libc/arch-x86/syscalls/symlink.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(symlink)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sync.S b/libc/arch-x86/syscalls/sync.S
index d2a4691..9e6d43d 100644
--- a/libc/arch-x86/syscalls/sync.S
+++ b/libc/arch-x86/syscalls/sync.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sync)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/sysinfo.S b/libc/arch-x86/syscalls/sysinfo.S
index b0fcd1d..5e53621 100644
--- a/libc/arch-x86/syscalls/sysinfo.S
+++ b/libc/arch-x86/syscalls/sysinfo.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(sysinfo)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/tgkill.S b/libc/arch-x86/syscalls/tgkill.S
index ac8e7f6..b2467a0 100644
--- a/libc/arch-x86/syscalls/tgkill.S
+++ b/libc/arch-x86/syscalls/tgkill.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(tgkill)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/timerfd_create.S b/libc/arch-x86/syscalls/timerfd_create.S
index 801f8a7..09e5b49 100644
--- a/libc/arch-x86/syscalls/timerfd_create.S
+++ b/libc/arch-x86/syscalls/timerfd_create.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(timerfd_create)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/timerfd_gettime.S b/libc/arch-x86/syscalls/timerfd_gettime.S
index fde17be..3f81098 100644
--- a/libc/arch-x86/syscalls/timerfd_gettime.S
+++ b/libc/arch-x86/syscalls/timerfd_gettime.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(timerfd_gettime)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/timerfd_settime.S b/libc/arch-x86/syscalls/timerfd_settime.S
index 5a5f3e4..367f652 100644
--- a/libc/arch-x86/syscalls/timerfd_settime.S
+++ b/libc/arch-x86/syscalls/timerfd_settime.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(timerfd_settime)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/times.S b/libc/arch-x86/syscalls/times.S
index 62f3039..04514dd 100644
--- a/libc/arch-x86/syscalls/times.S
+++ b/libc/arch-x86/syscalls/times.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(times)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/tkill.S b/libc/arch-x86/syscalls/tkill.S
index 38a7a80..9237e0a 100644
--- a/libc/arch-x86/syscalls/tkill.S
+++ b/libc/arch-x86/syscalls/tkill.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(tkill)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/truncate.S b/libc/arch-x86/syscalls/truncate.S
index ace7128..442e08c 100644
--- a/libc/arch-x86/syscalls/truncate.S
+++ b/libc/arch-x86/syscalls/truncate.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(truncate)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/truncate64.S b/libc/arch-x86/syscalls/truncate64.S
index f9118bb..04f794a 100644
--- a/libc/arch-x86/syscalls/truncate64.S
+++ b/libc/arch-x86/syscalls/truncate64.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(truncate64)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/umask.S b/libc/arch-x86/syscalls/umask.S
index f238975..4be0b47 100644
--- a/libc/arch-x86/syscalls/umask.S
+++ b/libc/arch-x86/syscalls/umask.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(umask)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/umount2.S b/libc/arch-x86/syscalls/umount2.S
index 3bc04c8..2540ac8 100644
--- a/libc/arch-x86/syscalls/umount2.S
+++ b/libc/arch-x86/syscalls/umount2.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(umount2)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/uname.S b/libc/arch-x86/syscalls/uname.S
index 00c1a0c..ef27a6d 100644
--- a/libc/arch-x86/syscalls/uname.S
+++ b/libc/arch-x86/syscalls/uname.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(uname)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/unlink.S b/libc/arch-x86/syscalls/unlink.S
index 60e7b47..fe63fe4 100644
--- a/libc/arch-x86/syscalls/unlink.S
+++ b/libc/arch-x86/syscalls/unlink.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(unlink)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/unlinkat.S b/libc/arch-x86/syscalls/unlinkat.S
index 2e1a04f..e17fb50 100644
--- a/libc/arch-x86/syscalls/unlinkat.S
+++ b/libc/arch-x86/syscalls/unlinkat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(unlinkat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/unshare.S b/libc/arch-x86/syscalls/unshare.S
index f5b9a44..aea9fba 100644
--- a/libc/arch-x86/syscalls/unshare.S
+++ b/libc/arch-x86/syscalls/unshare.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(unshare)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/utimensat.S b/libc/arch-x86/syscalls/utimensat.S
index ab31922..1318091 100644
--- a/libc/arch-x86/syscalls/utimensat.S
+++ b/libc/arch-x86/syscalls/utimensat.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(utimensat)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/utimes.S b/libc/arch-x86/syscalls/utimes.S
index 4ca4a8d..4eafb88 100644
--- a/libc/arch-x86/syscalls/utimes.S
+++ b/libc/arch-x86/syscalls/utimes.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(utimes)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/wait4.S b/libc/arch-x86/syscalls/wait4.S
index 9de704a..d9d3ff4 100644
--- a/libc/arch-x86/syscalls/wait4.S
+++ b/libc/arch-x86/syscalls/wait4.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(wait4)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/write.S b/libc/arch-x86/syscalls/write.S
index 11d0c72..e0cac67 100644
--- a/libc/arch-x86/syscalls/write.S
+++ b/libc/arch-x86/syscalls/write.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(write)
pushl %ebx
diff --git a/libc/arch-x86/syscalls/writev.S b/libc/arch-x86/syscalls/writev.S
index a158a14..e8dab42 100644
--- a/libc/arch-x86/syscalls/writev.S
+++ b/libc/arch-x86/syscalls/writev.S
@@ -1,7 +1,7 @@
/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
#include <linux/err.h>
#include <machine/asm.h>
-#include <asm/unistd.h>
ENTRY(writev)
pushl %ebx
diff --git a/libc/arch-x86_64/syscalls.mk b/libc/arch-x86_64/syscalls.mk
new file mode 100644
index 0000000..5a7a880
--- /dev/null
+++ b/libc/arch-x86_64/syscalls.mk
@@ -0,0 +1,203 @@
+# Auto-generated by gensyscalls.py. Do not edit.
+syscall_src :=
+syscall_src += arch-x86_64/syscalls/_exit.S
+syscall_src += arch-x86_64/syscalls/_exit_thread.S
+syscall_src += arch-x86_64/syscalls/__fork.S
+syscall_src += arch-x86_64/syscalls/__waitid.S
+syscall_src += arch-x86_64/syscalls/wait4.S
+syscall_src += arch-x86_64/syscalls/__sys_clone.S
+syscall_src += arch-x86_64/syscalls/execve.S
+syscall_src += arch-x86_64/syscalls/__setuid.S
+syscall_src += arch-x86_64/syscalls/getuid.S
+syscall_src += arch-x86_64/syscalls/getgid.S
+syscall_src += arch-x86_64/syscalls/geteuid.S
+syscall_src += arch-x86_64/syscalls/getegid.S
+syscall_src += arch-x86_64/syscalls/getresuid.S
+syscall_src += arch-x86_64/syscalls/getresgid.S
+syscall_src += arch-x86_64/syscalls/gettid.S
+syscall_src += arch-x86_64/syscalls/readahead.S
+syscall_src += arch-x86_64/syscalls/getgroups.S
+syscall_src += arch-x86_64/syscalls/getpgid.S
+syscall_src += arch-x86_64/syscalls/getppid.S
+syscall_src += arch-x86_64/syscalls/getsid.S
+syscall_src += arch-x86_64/syscalls/setsid.S
+syscall_src += arch-x86_64/syscalls/setgid.S
+syscall_src += arch-x86_64/syscalls/__setreuid.S
+syscall_src += arch-x86_64/syscalls/__setresuid.S
+syscall_src += arch-x86_64/syscalls/setresgid.S
+syscall_src += arch-x86_64/syscalls/__brk.S
+syscall_src += arch-x86_64/syscalls/kill.S
+syscall_src += arch-x86_64/syscalls/tkill.S
+syscall_src += arch-x86_64/syscalls/tgkill.S
+syscall_src += arch-x86_64/syscalls/__ptrace.S
+syscall_src += arch-x86_64/syscalls/__getpriority.S
+syscall_src += arch-x86_64/syscalls/setpriority.S
+syscall_src += arch-x86_64/syscalls/setrlimit.S
+syscall_src += arch-x86_64/syscalls/getrlimit.S
+syscall_src += arch-x86_64/syscalls/getrusage.S
+syscall_src += arch-x86_64/syscalls/setgroups.S
+syscall_src += arch-x86_64/syscalls/setpgid.S
+syscall_src += arch-x86_64/syscalls/vfork.S
+syscall_src += arch-x86_64/syscalls/setregid.S
+syscall_src += arch-x86_64/syscalls/chroot.S
+syscall_src += arch-x86_64/syscalls/prctl.S
+syscall_src += arch-x86_64/syscalls/arch_prctl.S
+syscall_src += arch-x86_64/syscalls/capget.S
+syscall_src += arch-x86_64/syscalls/capset.S
+syscall_src += arch-x86_64/syscalls/sigaltstack.S
+syscall_src += arch-x86_64/syscalls/acct.S
+syscall_src += arch-x86_64/syscalls/read.S
+syscall_src += arch-x86_64/syscalls/write.S
+syscall_src += arch-x86_64/syscalls/pread64.S
+syscall_src += arch-x86_64/syscalls/pwrite64.S
+syscall_src += arch-x86_64/syscalls/__open.S
+syscall_src += arch-x86_64/syscalls/__openat.S
+syscall_src += arch-x86_64/syscalls/close.S
+syscall_src += arch-x86_64/syscalls/lseek.S
+syscall_src += arch-x86_64/syscalls/getpid.S
+syscall_src += arch-x86_64/syscalls/mmap.S
+syscall_src += arch-x86_64/syscalls/munmap.S
+syscall_src += arch-x86_64/syscalls/mremap.S
+syscall_src += arch-x86_64/syscalls/msync.S
+syscall_src += arch-x86_64/syscalls/mprotect.S
+syscall_src += arch-x86_64/syscalls/madvise.S
+syscall_src += arch-x86_64/syscalls/mlock.S
+syscall_src += arch-x86_64/syscalls/munlock.S
+syscall_src += arch-x86_64/syscalls/mlockall.S
+syscall_src += arch-x86_64/syscalls/munlockall.S
+syscall_src += arch-x86_64/syscalls/mincore.S
+syscall_src += arch-x86_64/syscalls/__ioctl.S
+syscall_src += arch-x86_64/syscalls/readv.S
+syscall_src += arch-x86_64/syscalls/writev.S
+syscall_src += arch-x86_64/syscalls/fcntl.S
+syscall_src += arch-x86_64/syscalls/flock.S
+syscall_src += arch-x86_64/syscalls/fchmod.S
+syscall_src += arch-x86_64/syscalls/dup.S
+syscall_src += arch-x86_64/syscalls/pipe.S
+syscall_src += arch-x86_64/syscalls/pipe2.S
+syscall_src += arch-x86_64/syscalls/dup2.S
+syscall_src += arch-x86_64/syscalls/select.S
+syscall_src += arch-x86_64/syscalls/ftruncate.S
+syscall_src += arch-x86_64/syscalls/getdents.S
+syscall_src += arch-x86_64/syscalls/fsync.S
+syscall_src += arch-x86_64/syscalls/fdatasync.S
+syscall_src += arch-x86_64/syscalls/fchown.S
+syscall_src += arch-x86_64/syscalls/sync.S
+syscall_src += arch-x86_64/syscalls/fstatfs.S
+syscall_src += arch-x86_64/syscalls/sendfile.S
+syscall_src += arch-x86_64/syscalls/mkdirat.S
+syscall_src += arch-x86_64/syscalls/fchownat.S
+syscall_src += arch-x86_64/syscalls/fchmodat.S
+syscall_src += arch-x86_64/syscalls/renameat.S
+syscall_src += arch-x86_64/syscalls/fsetxattr.S
+syscall_src += arch-x86_64/syscalls/fgetxattr.S
+syscall_src += arch-x86_64/syscalls/flistxattr.S
+syscall_src += arch-x86_64/syscalls/fremovexattr.S
+syscall_src += arch-x86_64/syscalls/link.S
+syscall_src += arch-x86_64/syscalls/unlink.S
+syscall_src += arch-x86_64/syscalls/unlinkat.S
+syscall_src += arch-x86_64/syscalls/chdir.S
+syscall_src += arch-x86_64/syscalls/mknod.S
+syscall_src += arch-x86_64/syscalls/chmod.S
+syscall_src += arch-x86_64/syscalls/chown.S
+syscall_src += arch-x86_64/syscalls/lchown.S
+syscall_src += arch-x86_64/syscalls/mount.S
+syscall_src += arch-x86_64/syscalls/umount2.S
+syscall_src += arch-x86_64/syscalls/fstat.S
+syscall_src += arch-x86_64/syscalls/stat.S
+syscall_src += arch-x86_64/syscalls/lstat.S
+syscall_src += arch-x86_64/syscalls/mkdir.S
+syscall_src += arch-x86_64/syscalls/readlink.S
+syscall_src += arch-x86_64/syscalls/rmdir.S
+syscall_src += arch-x86_64/syscalls/rename.S
+syscall_src += arch-x86_64/syscalls/__getcwd.S
+syscall_src += arch-x86_64/syscalls/access.S
+syscall_src += arch-x86_64/syscalls/faccessat.S
+syscall_src += arch-x86_64/syscalls/symlink.S
+syscall_src += arch-x86_64/syscalls/fchdir.S
+syscall_src += arch-x86_64/syscalls/truncate.S
+syscall_src += arch-x86_64/syscalls/setxattr.S
+syscall_src += arch-x86_64/syscalls/lsetxattr.S
+syscall_src += arch-x86_64/syscalls/getxattr.S
+syscall_src += arch-x86_64/syscalls/lgetxattr.S
+syscall_src += arch-x86_64/syscalls/listxattr.S
+syscall_src += arch-x86_64/syscalls/llistxattr.S
+syscall_src += arch-x86_64/syscalls/removexattr.S
+syscall_src += arch-x86_64/syscalls/lremovexattr.S
+syscall_src += arch-x86_64/syscalls/statfs.S
+syscall_src += arch-x86_64/syscalls/unshare.S
+syscall_src += arch-x86_64/syscalls/swapon.S
+syscall_src += arch-x86_64/syscalls/swapoff.S
+syscall_src += arch-x86_64/syscalls/pause.S
+syscall_src += arch-x86_64/syscalls/gettimeofday.S
+syscall_src += arch-x86_64/syscalls/settimeofday.S
+syscall_src += arch-x86_64/syscalls/times.S
+syscall_src += arch-x86_64/syscalls/nanosleep.S
+syscall_src += arch-x86_64/syscalls/clock_gettime.S
+syscall_src += arch-x86_64/syscalls/clock_settime.S
+syscall_src += arch-x86_64/syscalls/clock_getres.S
+syscall_src += arch-x86_64/syscalls/clock_nanosleep.S
+syscall_src += arch-x86_64/syscalls/getitimer.S
+syscall_src += arch-x86_64/syscalls/setitimer.S
+syscall_src += arch-x86_64/syscalls/__timer_create.S
+syscall_src += arch-x86_64/syscalls/__timer_settime.S
+syscall_src += arch-x86_64/syscalls/__timer_gettime.S
+syscall_src += arch-x86_64/syscalls/__timer_getoverrun.S
+syscall_src += arch-x86_64/syscalls/__timer_delete.S
+syscall_src += arch-x86_64/syscalls/utimes.S
+syscall_src += arch-x86_64/syscalls/utimensat.S
+syscall_src += arch-x86_64/syscalls/timerfd_create.S
+syscall_src += arch-x86_64/syscalls/timerfd_settime.S
+syscall_src += arch-x86_64/syscalls/timerfd_gettime.S
+syscall_src += arch-x86_64/syscalls/__rt_sigsuspend.S
+syscall_src += arch-x86_64/syscalls/__rt_sigaction.S
+syscall_src += arch-x86_64/syscalls/__rt_sigprocmask.S
+syscall_src += arch-x86_64/syscalls/__rt_sigtimedwait.S
+syscall_src += arch-x86_64/syscalls/signalfd4.S
+syscall_src += arch-x86_64/syscalls/socket.S
+syscall_src += arch-x86_64/syscalls/socketpair.S
+syscall_src += arch-x86_64/syscalls/bind.S
+syscall_src += arch-x86_64/syscalls/connect.S
+syscall_src += arch-x86_64/syscalls/listen.S
+syscall_src += arch-x86_64/syscalls/accept.S
+syscall_src += arch-x86_64/syscalls/getsockname.S
+syscall_src += arch-x86_64/syscalls/getpeername.S
+syscall_src += arch-x86_64/syscalls/sendto.S
+syscall_src += arch-x86_64/syscalls/recvfrom.S
+syscall_src += arch-x86_64/syscalls/shutdown.S
+syscall_src += arch-x86_64/syscalls/setsockopt.S
+syscall_src += arch-x86_64/syscalls/getsockopt.S
+syscall_src += arch-x86_64/syscalls/sendmsg.S
+syscall_src += arch-x86_64/syscalls/recvmsg.S
+syscall_src += arch-x86_64/syscalls/sched_setscheduler.S
+syscall_src += arch-x86_64/syscalls/sched_getscheduler.S
+syscall_src += arch-x86_64/syscalls/sched_yield.S
+syscall_src += arch-x86_64/syscalls/sched_setparam.S
+syscall_src += arch-x86_64/syscalls/sched_getparam.S
+syscall_src += arch-x86_64/syscalls/sched_get_priority_max.S
+syscall_src += arch-x86_64/syscalls/sched_get_priority_min.S
+syscall_src += arch-x86_64/syscalls/sched_rr_get_interval.S
+syscall_src += arch-x86_64/syscalls/sched_setaffinity.S
+syscall_src += arch-x86_64/syscalls/__sched_getaffinity.S
+syscall_src += arch-x86_64/syscalls/__getcpu.S
+syscall_src += arch-x86_64/syscalls/ioprio_set.S
+syscall_src += arch-x86_64/syscalls/ioprio_get.S
+syscall_src += arch-x86_64/syscalls/uname.S
+syscall_src += arch-x86_64/syscalls/umask.S
+syscall_src += arch-x86_64/syscalls/__reboot.S
+syscall_src += arch-x86_64/syscalls/__syslog.S
+syscall_src += arch-x86_64/syscalls/init_module.S
+syscall_src += arch-x86_64/syscalls/delete_module.S
+syscall_src += arch-x86_64/syscalls/klogctl.S
+syscall_src += arch-x86_64/syscalls/sysinfo.S
+syscall_src += arch-x86_64/syscalls/personality.S
+syscall_src += arch-x86_64/syscalls/perf_event_open.S
+syscall_src += arch-x86_64/syscalls/futex.S
+syscall_src += arch-x86_64/syscalls/epoll_create.S
+syscall_src += arch-x86_64/syscalls/epoll_ctl.S
+syscall_src += arch-x86_64/syscalls/epoll_wait.S
+syscall_src += arch-x86_64/syscalls/inotify_init.S
+syscall_src += arch-x86_64/syscalls/inotify_add_watch.S
+syscall_src += arch-x86_64/syscalls/inotify_rm_watch.S
+syscall_src += arch-x86_64/syscalls/poll.S
+syscall_src += arch-x86_64/syscalls/eventfd.S
diff --git a/libc/arch-x86_64/syscalls/__brk.S b/libc/arch-x86_64/syscalls/__brk.S
new file mode 100644
index 0000000..ea5b9cf
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__brk.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__brk)
+ movl $__NR_brk, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__brk)
diff --git a/libc/arch-x86_64/syscalls/__fork.S b/libc/arch-x86_64/syscalls/__fork.S
new file mode 100644
index 0000000..75f2ed7
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__fork.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__fork)
+ movl $__NR_fork, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__fork)
diff --git a/libc/arch-x86_64/syscalls/__getcpu.S b/libc/arch-x86_64/syscalls/__getcpu.S
new file mode 100644
index 0000000..47d5350
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__getcpu.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__getcpu)
+ movl $__NR_getcpu, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__getcpu)
diff --git a/libc/arch-x86_64/syscalls/__getcwd.S b/libc/arch-x86_64/syscalls/__getcwd.S
new file mode 100644
index 0000000..2a274a9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__getcwd.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__getcwd)
+ movl $__NR_getcwd, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__getcwd)
diff --git a/libc/arch-x86_64/syscalls/__getpriority.S b/libc/arch-x86_64/syscalls/__getpriority.S
new file mode 100644
index 0000000..6d8d6f7
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__getpriority.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__getpriority)
+ movl $__NR_getpriority, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__getpriority)
diff --git a/libc/arch-x86_64/syscalls/__ioctl.S b/libc/arch-x86_64/syscalls/__ioctl.S
new file mode 100644
index 0000000..e9b3afa
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__ioctl.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__ioctl)
+ movl $__NR_ioctl, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__ioctl)
diff --git a/libc/arch-x86_64/syscalls/__open.S b/libc/arch-x86_64/syscalls/__open.S
new file mode 100644
index 0000000..ef106e3
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__open.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__open)
+ movl $__NR_open, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__open)
diff --git a/libc/arch-x86_64/syscalls/__openat.S b/libc/arch-x86_64/syscalls/__openat.S
new file mode 100644
index 0000000..adb2e1a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__openat.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__openat)
+ movq %rcx, %r10
+ movl $__NR_openat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__openat)
diff --git a/libc/arch-x86_64/syscalls/__ptrace.S b/libc/arch-x86_64/syscalls/__ptrace.S
new file mode 100644
index 0000000..75586bd
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__ptrace.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__ptrace)
+ movq %rcx, %r10
+ movl $__NR_ptrace, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__ptrace)
diff --git a/libc/arch-x86_64/syscalls/__reboot.S b/libc/arch-x86_64/syscalls/__reboot.S
new file mode 100644
index 0000000..46588c2
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__reboot.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__reboot)
+ movq %rcx, %r10
+ movl $__NR_reboot, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__reboot)
diff --git a/libc/arch-x86_64/syscalls/__rt_sigaction.S b/libc/arch-x86_64/syscalls/__rt_sigaction.S
new file mode 100644
index 0000000..90129d7
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__rt_sigaction.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__rt_sigaction)
+ movq %rcx, %r10
+ movl $__NR_rt_sigaction, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__rt_sigaction)
diff --git a/libc/arch-x86_64/syscalls/__rt_sigprocmask.S b/libc/arch-x86_64/syscalls/__rt_sigprocmask.S
new file mode 100644
index 0000000..dc3c1fc
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__rt_sigprocmask.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__rt_sigprocmask)
+ movq %rcx, %r10
+ movl $__NR_rt_sigprocmask, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__rt_sigprocmask)
diff --git a/libc/arch-x86_64/syscalls/__rt_sigsuspend.S b/libc/arch-x86_64/syscalls/__rt_sigsuspend.S
new file mode 100644
index 0000000..0efbd07
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__rt_sigsuspend.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__rt_sigsuspend)
+ movl $__NR_rt_sigsuspend, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__rt_sigsuspend)
diff --git a/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S b/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S
new file mode 100644
index 0000000..3907d25
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__rt_sigtimedwait.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__rt_sigtimedwait)
+ movq %rcx, %r10
+ movl $__NR_rt_sigtimedwait, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__rt_sigtimedwait)
diff --git a/libc/arch-x86_64/syscalls/__sched_getaffinity.S b/libc/arch-x86_64/syscalls/__sched_getaffinity.S
new file mode 100644
index 0000000..c783bc3
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__sched_getaffinity.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__sched_getaffinity)
+ movl $__NR_sched_getaffinity, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__sched_getaffinity)
diff --git a/libc/arch-x86_64/syscalls/__setresuid.S b/libc/arch-x86_64/syscalls/__setresuid.S
new file mode 100644
index 0000000..e4ca4b8
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__setresuid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__setresuid)
+ movl $__NR_setresuid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__setresuid)
diff --git a/libc/arch-x86_64/syscalls/__setreuid.S b/libc/arch-x86_64/syscalls/__setreuid.S
new file mode 100644
index 0000000..89d2aad
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__setreuid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__setreuid)
+ movl $__NR_setreuid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__setreuid)
diff --git a/libc/arch-x86_64/syscalls/__setuid.S b/libc/arch-x86_64/syscalls/__setuid.S
new file mode 100644
index 0000000..20b5089
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__setuid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__setuid)
+ movl $__NR_setuid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__setuid)
diff --git a/libc/arch-x86_64/syscalls/__sys_clone.S b/libc/arch-x86_64/syscalls/__sys_clone.S
new file mode 100644
index 0000000..557a681
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__sys_clone.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__sys_clone)
+ movq %rcx, %r10
+ movl $__NR_clone, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__sys_clone)
diff --git a/libc/arch-x86_64/syscalls/__syslog.S b/libc/arch-x86_64/syscalls/__syslog.S
new file mode 100644
index 0000000..4b76ad2
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__syslog.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__syslog)
+ movl $__NR_syslog, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__syslog)
diff --git a/libc/arch-x86_64/syscalls/__timer_create.S b/libc/arch-x86_64/syscalls/__timer_create.S
new file mode 100644
index 0000000..cb46a1b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__timer_create.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__timer_create)
+ movl $__NR_timer_create, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__timer_create)
diff --git a/libc/arch-x86_64/syscalls/__timer_delete.S b/libc/arch-x86_64/syscalls/__timer_delete.S
new file mode 100644
index 0000000..785f4ef
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__timer_delete.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__timer_delete)
+ movl $__NR_timer_delete, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__timer_delete)
diff --git a/libc/arch-x86_64/syscalls/__timer_getoverrun.S b/libc/arch-x86_64/syscalls/__timer_getoverrun.S
new file mode 100644
index 0000000..bc5383f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__timer_getoverrun.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__timer_getoverrun)
+ movl $__NR_timer_getoverrun, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__timer_getoverrun)
diff --git a/libc/arch-x86_64/syscalls/__timer_gettime.S b/libc/arch-x86_64/syscalls/__timer_gettime.S
new file mode 100644
index 0000000..29577cb
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__timer_gettime.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__timer_gettime)
+ movl $__NR_timer_gettime, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__timer_gettime)
diff --git a/libc/arch-x86_64/syscalls/__timer_settime.S b/libc/arch-x86_64/syscalls/__timer_settime.S
new file mode 100644
index 0000000..1f79eca
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__timer_settime.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__timer_settime)
+ movq %rcx, %r10
+ movl $__NR_timer_settime, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__timer_settime)
diff --git a/libc/arch-x86_64/syscalls/__waitid.S b/libc/arch-x86_64/syscalls/__waitid.S
new file mode 100644
index 0000000..7e278a5
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/__waitid.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(__waitid)
+ movq %rcx, %r10
+ movl $__NR_waitid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(__waitid)
diff --git a/libc/arch-x86_64/syscalls/_exit.S b/libc/arch-x86_64/syscalls/_exit.S
new file mode 100644
index 0000000..6628ac9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/_exit.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(_exit)
+ movl $__NR_exit_group, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(_exit)
diff --git a/libc/arch-x86_64/syscalls/_exit_thread.S b/libc/arch-x86_64/syscalls/_exit_thread.S
new file mode 100644
index 0000000..0992af4
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/_exit_thread.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(_exit_thread)
+ movl $__NR_exit, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(_exit_thread)
diff --git a/libc/arch-x86_64/syscalls/accept.S b/libc/arch-x86_64/syscalls/accept.S
new file mode 100644
index 0000000..688637a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/accept.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(accept)
+ movl $__NR_accept, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(accept)
diff --git a/libc/arch-x86_64/syscalls/access.S b/libc/arch-x86_64/syscalls/access.S
new file mode 100644
index 0000000..fc4d620
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/access.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(access)
+ movl $__NR_access, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(access)
diff --git a/libc/arch-x86_64/syscalls/acct.S b/libc/arch-x86_64/syscalls/acct.S
new file mode 100644
index 0000000..fac8a26
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/acct.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(acct)
+ movl $__NR_acct, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(acct)
diff --git a/libc/arch-x86_64/syscalls/arch_prctl.S b/libc/arch-x86_64/syscalls/arch_prctl.S
new file mode 100644
index 0000000..eaf9494
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/arch_prctl.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(arch_prctl)
+ movl $__NR_arch_prctl, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(arch_prctl)
diff --git a/libc/arch-x86_64/syscalls/bind.S b/libc/arch-x86_64/syscalls/bind.S
new file mode 100644
index 0000000..c9bb7fe
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/bind.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(bind)
+ movl $__NR_bind, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(bind)
diff --git a/libc/arch-x86_64/syscalls/capget.S b/libc/arch-x86_64/syscalls/capget.S
new file mode 100644
index 0000000..a043647
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/capget.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(capget)
+ movl $__NR_capget, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(capget)
diff --git a/libc/arch-x86_64/syscalls/capset.S b/libc/arch-x86_64/syscalls/capset.S
new file mode 100644
index 0000000..fba3d24
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/capset.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(capset)
+ movl $__NR_capset, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(capset)
diff --git a/libc/arch-x86_64/syscalls/chdir.S b/libc/arch-x86_64/syscalls/chdir.S
new file mode 100644
index 0000000..8eb4949
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/chdir.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(chdir)
+ movl $__NR_chdir, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(chdir)
diff --git a/libc/arch-x86_64/syscalls/chmod.S b/libc/arch-x86_64/syscalls/chmod.S
new file mode 100644
index 0000000..069aae1
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/chmod.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(chmod)
+ movl $__NR_chmod, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(chmod)
diff --git a/libc/arch-x86_64/syscalls/chown.S b/libc/arch-x86_64/syscalls/chown.S
new file mode 100644
index 0000000..0281659
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/chown.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(chown)
+ movl $__NR_chown, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(chown)
diff --git a/libc/arch-x86_64/syscalls/chroot.S b/libc/arch-x86_64/syscalls/chroot.S
new file mode 100644
index 0000000..2f303ee
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/chroot.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(chroot)
+ movl $__NR_chroot, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(chroot)
diff --git a/libc/arch-x86_64/syscalls/clock_getres.S b/libc/arch-x86_64/syscalls/clock_getres.S
new file mode 100644
index 0000000..38ff52a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/clock_getres.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(clock_getres)
+ movl $__NR_clock_getres, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(clock_getres)
diff --git a/libc/arch-x86_64/syscalls/clock_gettime.S b/libc/arch-x86_64/syscalls/clock_gettime.S
new file mode 100644
index 0000000..f299fb1
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/clock_gettime.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(clock_gettime)
+ movl $__NR_clock_gettime, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(clock_gettime)
diff --git a/libc/arch-x86_64/syscalls/clock_nanosleep.S b/libc/arch-x86_64/syscalls/clock_nanosleep.S
new file mode 100644
index 0000000..f61f364
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/clock_nanosleep.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(clock_nanosleep)
+ movq %rcx, %r10
+ movl $__NR_clock_nanosleep, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(clock_nanosleep)
diff --git a/libc/arch-x86_64/syscalls/clock_settime.S b/libc/arch-x86_64/syscalls/clock_settime.S
new file mode 100644
index 0000000..520c81c
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/clock_settime.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(clock_settime)
+ movl $__NR_clock_settime, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(clock_settime)
diff --git a/libc/arch-x86_64/syscalls/close.S b/libc/arch-x86_64/syscalls/close.S
new file mode 100644
index 0000000..596e9d7
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/close.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(close)
+ movl $__NR_close, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(close)
diff --git a/libc/arch-x86_64/syscalls/connect.S b/libc/arch-x86_64/syscalls/connect.S
new file mode 100644
index 0000000..45ab826
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/connect.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(connect)
+ movl $__NR_connect, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(connect)
diff --git a/libc/arch-x86_64/syscalls/delete_module.S b/libc/arch-x86_64/syscalls/delete_module.S
new file mode 100644
index 0000000..f5e1fc8
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/delete_module.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(delete_module)
+ movl $__NR_delete_module, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(delete_module)
diff --git a/libc/arch-x86_64/syscalls/dup.S b/libc/arch-x86_64/syscalls/dup.S
new file mode 100644
index 0000000..fdb0cf0
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/dup.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(dup)
+ movl $__NR_dup, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(dup)
diff --git a/libc/arch-x86_64/syscalls/dup2.S b/libc/arch-x86_64/syscalls/dup2.S
new file mode 100644
index 0000000..cc6f65b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/dup2.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(dup2)
+ movl $__NR_dup2, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(dup2)
diff --git a/libc/arch-x86_64/syscalls/epoll_create.S b/libc/arch-x86_64/syscalls/epoll_create.S
new file mode 100644
index 0000000..af5b6a5
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/epoll_create.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(epoll_create)
+ movl $__NR_epoll_create, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(epoll_create)
diff --git a/libc/arch-x86_64/syscalls/epoll_ctl.S b/libc/arch-x86_64/syscalls/epoll_ctl.S
new file mode 100644
index 0000000..df9f561
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/epoll_ctl.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(epoll_ctl)
+ movq %rcx, %r10
+ movl $__NR_epoll_ctl, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(epoll_ctl)
diff --git a/libc/arch-x86_64/syscalls/epoll_wait.S b/libc/arch-x86_64/syscalls/epoll_wait.S
new file mode 100644
index 0000000..04cd25a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/epoll_wait.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(epoll_wait)
+ movq %rcx, %r10
+ movl $__NR_epoll_wait, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(epoll_wait)
diff --git a/libc/arch-x86_64/syscalls/eventfd.S b/libc/arch-x86_64/syscalls/eventfd.S
new file mode 100644
index 0000000..a005323
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/eventfd.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(eventfd)
+ movl $__NR_eventfd2, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(eventfd)
diff --git a/libc/arch-x86_64/syscalls/execve.S b/libc/arch-x86_64/syscalls/execve.S
new file mode 100644
index 0000000..dd00ae5
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/execve.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(execve)
+ movl $__NR_execve, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(execve)
diff --git a/libc/arch-x86_64/syscalls/faccessat.S b/libc/arch-x86_64/syscalls/faccessat.S
new file mode 100644
index 0000000..75de9c8
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/faccessat.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(faccessat)
+ movq %rcx, %r10
+ movl $__NR_faccessat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(faccessat)
diff --git a/libc/arch-x86_64/syscalls/fchdir.S b/libc/arch-x86_64/syscalls/fchdir.S
new file mode 100644
index 0000000..a669808
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fchdir.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fchdir)
+ movl $__NR_fchdir, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fchdir)
diff --git a/libc/arch-x86_64/syscalls/fchmod.S b/libc/arch-x86_64/syscalls/fchmod.S
new file mode 100644
index 0000000..c20073d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fchmod.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fchmod)
+ movl $__NR_fchmod, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fchmod)
diff --git a/libc/arch-x86_64/syscalls/fchmodat.S b/libc/arch-x86_64/syscalls/fchmodat.S
new file mode 100644
index 0000000..afc67fe
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fchmodat.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fchmodat)
+ movq %rcx, %r10
+ movl $__NR_fchmodat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fchmodat)
diff --git a/libc/arch-x86_64/syscalls/fchown.S b/libc/arch-x86_64/syscalls/fchown.S
new file mode 100644
index 0000000..4411cbf
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fchown.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fchown)
+ movl $__NR_fchown, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fchown)
diff --git a/libc/arch-x86_64/syscalls/fchownat.S b/libc/arch-x86_64/syscalls/fchownat.S
new file mode 100644
index 0000000..da2f5da
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fchownat.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fchownat)
+ movq %rcx, %r10
+ movl $__NR_fchownat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fchownat)
diff --git a/libc/arch-x86_64/syscalls/fcntl.S b/libc/arch-x86_64/syscalls/fcntl.S
new file mode 100644
index 0000000..dd3b940
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fcntl.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fcntl)
+ movl $__NR_fcntl, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fcntl)
diff --git a/libc/arch-x86_64/syscalls/fdatasync.S b/libc/arch-x86_64/syscalls/fdatasync.S
new file mode 100644
index 0000000..55777b9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fdatasync.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fdatasync)
+ movl $__NR_fdatasync, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fdatasync)
diff --git a/libc/arch-x86_64/syscalls/fgetxattr.S b/libc/arch-x86_64/syscalls/fgetxattr.S
new file mode 100644
index 0000000..92e4cf8
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fgetxattr.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fgetxattr)
+ movq %rcx, %r10
+ movl $__NR_fgetxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fgetxattr)
diff --git a/libc/arch-x86_64/syscalls/flistxattr.S b/libc/arch-x86_64/syscalls/flistxattr.S
new file mode 100644
index 0000000..8b0053b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/flistxattr.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(flistxattr)
+ movl $__NR_flistxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(flistxattr)
diff --git a/libc/arch-x86_64/syscalls/flock.S b/libc/arch-x86_64/syscalls/flock.S
new file mode 100644
index 0000000..fb8b69d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/flock.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(flock)
+ movl $__NR_flock, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(flock)
diff --git a/libc/arch-x86_64/syscalls/fremovexattr.S b/libc/arch-x86_64/syscalls/fremovexattr.S
new file mode 100644
index 0000000..5bf5d0d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fremovexattr.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fremovexattr)
+ movl $__NR_fremovexattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fremovexattr)
diff --git a/libc/arch-x86_64/syscalls/fsetxattr.S b/libc/arch-x86_64/syscalls/fsetxattr.S
new file mode 100644
index 0000000..15b1643
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fsetxattr.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fsetxattr)
+ movq %rcx, %r10
+ movl $__NR_fsetxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fsetxattr)
diff --git a/libc/arch-x86_64/syscalls/fstat.S b/libc/arch-x86_64/syscalls/fstat.S
new file mode 100644
index 0000000..18d3649
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fstat.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fstat)
+ movl $__NR_fstat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fstat)
diff --git a/libc/arch-x86_64/syscalls/fstatfs.S b/libc/arch-x86_64/syscalls/fstatfs.S
new file mode 100644
index 0000000..8ae21e7
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fstatfs.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fstatfs)
+ movl $__NR_fstatfs, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fstatfs)
diff --git a/libc/arch-x86_64/syscalls/fsync.S b/libc/arch-x86_64/syscalls/fsync.S
new file mode 100644
index 0000000..80a45f3
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/fsync.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(fsync)
+ movl $__NR_fsync, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(fsync)
diff --git a/libc/arch-x86_64/syscalls/ftruncate.S b/libc/arch-x86_64/syscalls/ftruncate.S
new file mode 100644
index 0000000..97c7be9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/ftruncate.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(ftruncate)
+ movl $__NR_ftruncate, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(ftruncate)
diff --git a/libc/arch-x86_64/syscalls/futex.S b/libc/arch-x86_64/syscalls/futex.S
new file mode 100644
index 0000000..b9e61af
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/futex.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(futex)
+ movq %rcx, %r10
+ movl $__NR_futex, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(futex)
diff --git a/libc/arch-x86_64/syscalls/getdents.S b/libc/arch-x86_64/syscalls/getdents.S
new file mode 100644
index 0000000..b92d18d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getdents.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getdents)
+ movl $__NR_getdents64, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getdents)
diff --git a/libc/arch-x86_64/syscalls/getegid.S b/libc/arch-x86_64/syscalls/getegid.S
new file mode 100644
index 0000000..47bb072
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getegid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getegid)
+ movl $__NR_getegid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getegid)
diff --git a/libc/arch-x86_64/syscalls/geteuid.S b/libc/arch-x86_64/syscalls/geteuid.S
new file mode 100644
index 0000000..779b5eb
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/geteuid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(geteuid)
+ movl $__NR_geteuid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(geteuid)
diff --git a/libc/arch-x86_64/syscalls/getgid.S b/libc/arch-x86_64/syscalls/getgid.S
new file mode 100644
index 0000000..30fabb7
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getgid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getgid)
+ movl $__NR_getgid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getgid)
diff --git a/libc/arch-x86_64/syscalls/getgroups.S b/libc/arch-x86_64/syscalls/getgroups.S
new file mode 100644
index 0000000..edd0019
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getgroups.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getgroups)
+ movl $__NR_getgroups, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getgroups)
diff --git a/libc/arch-x86_64/syscalls/getitimer.S b/libc/arch-x86_64/syscalls/getitimer.S
new file mode 100644
index 0000000..f39873f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getitimer.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getitimer)
+ movl $__NR_getitimer, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getitimer)
diff --git a/libc/arch-x86_64/syscalls/getpeername.S b/libc/arch-x86_64/syscalls/getpeername.S
new file mode 100644
index 0000000..53a5029
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getpeername.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getpeername)
+ movl $__NR_getpeername, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getpeername)
diff --git a/libc/arch-x86_64/syscalls/getpgid.S b/libc/arch-x86_64/syscalls/getpgid.S
new file mode 100644
index 0000000..3d44627
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getpgid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getpgid)
+ movl $__NR_getpgid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getpgid)
diff --git a/libc/arch-x86_64/syscalls/getpid.S b/libc/arch-x86_64/syscalls/getpid.S
new file mode 100644
index 0000000..cddf9e9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getpid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getpid)
+ movl $__NR_getpid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getpid)
diff --git a/libc/arch-x86_64/syscalls/getppid.S b/libc/arch-x86_64/syscalls/getppid.S
new file mode 100644
index 0000000..03555f2
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getppid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getppid)
+ movl $__NR_getppid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getppid)
diff --git a/libc/arch-x86_64/syscalls/getresgid.S b/libc/arch-x86_64/syscalls/getresgid.S
new file mode 100644
index 0000000..ef17b8c
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getresgid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getresgid)
+ movl $__NR_getresgid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getresgid)
diff --git a/libc/arch-x86_64/syscalls/getresuid.S b/libc/arch-x86_64/syscalls/getresuid.S
new file mode 100644
index 0000000..fd3f62d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getresuid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getresuid)
+ movl $__NR_getresuid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getresuid)
diff --git a/libc/arch-x86_64/syscalls/getrlimit.S b/libc/arch-x86_64/syscalls/getrlimit.S
new file mode 100644
index 0000000..eb1241d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getrlimit.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getrlimit)
+ movl $__NR_getrlimit, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getrlimit)
diff --git a/libc/arch-x86_64/syscalls/getrusage.S b/libc/arch-x86_64/syscalls/getrusage.S
new file mode 100644
index 0000000..89eacfd
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getrusage.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getrusage)
+ movl $__NR_getrusage, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getrusage)
diff --git a/libc/arch-x86_64/syscalls/getsid.S b/libc/arch-x86_64/syscalls/getsid.S
new file mode 100644
index 0000000..fa09d5b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getsid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getsid)
+ movl $__NR_getsid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getsid)
diff --git a/libc/arch-x86_64/syscalls/getsockname.S b/libc/arch-x86_64/syscalls/getsockname.S
new file mode 100644
index 0000000..8206df2
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getsockname.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getsockname)
+ movl $__NR_getsockname, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getsockname)
diff --git a/libc/arch-x86_64/syscalls/getsockopt.S b/libc/arch-x86_64/syscalls/getsockopt.S
new file mode 100644
index 0000000..14a156f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getsockopt.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getsockopt)
+ movq %rcx, %r10
+ movl $__NR_getsockopt, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getsockopt)
diff --git a/libc/arch-x86_64/syscalls/gettid.S b/libc/arch-x86_64/syscalls/gettid.S
new file mode 100644
index 0000000..5491bef
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/gettid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(gettid)
+ movl $__NR_gettid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(gettid)
diff --git a/libc/arch-x86_64/syscalls/gettimeofday.S b/libc/arch-x86_64/syscalls/gettimeofday.S
new file mode 100644
index 0000000..7bf251a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/gettimeofday.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(gettimeofday)
+ movl $__NR_gettimeofday, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(gettimeofday)
diff --git a/libc/arch-x86_64/syscalls/getuid.S b/libc/arch-x86_64/syscalls/getuid.S
new file mode 100644
index 0000000..cdfd108
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getuid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getuid)
+ movl $__NR_getuid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getuid)
diff --git a/libc/arch-x86_64/syscalls/getxattr.S b/libc/arch-x86_64/syscalls/getxattr.S
new file mode 100644
index 0000000..f1a513d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/getxattr.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(getxattr)
+ movq %rcx, %r10
+ movl $__NR_getxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(getxattr)
diff --git a/libc/arch-x86_64/syscalls/init_module.S b/libc/arch-x86_64/syscalls/init_module.S
new file mode 100644
index 0000000..4e54b7f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/init_module.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(init_module)
+ movl $__NR_init_module, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(init_module)
diff --git a/libc/arch-x86_64/syscalls/inotify_add_watch.S b/libc/arch-x86_64/syscalls/inotify_add_watch.S
new file mode 100644
index 0000000..0a2d8f1
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/inotify_add_watch.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(inotify_add_watch)
+ movl $__NR_inotify_add_watch, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(inotify_add_watch)
diff --git a/libc/arch-x86_64/syscalls/inotify_init.S b/libc/arch-x86_64/syscalls/inotify_init.S
new file mode 100644
index 0000000..0d20efc
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/inotify_init.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(inotify_init)
+ movl $__NR_inotify_init, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(inotify_init)
diff --git a/libc/arch-x86_64/syscalls/inotify_rm_watch.S b/libc/arch-x86_64/syscalls/inotify_rm_watch.S
new file mode 100644
index 0000000..9f53e64
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/inotify_rm_watch.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(inotify_rm_watch)
+ movl $__NR_inotify_rm_watch, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(inotify_rm_watch)
diff --git a/libc/arch-x86_64/syscalls/ioprio_get.S b/libc/arch-x86_64/syscalls/ioprio_get.S
new file mode 100644
index 0000000..6523bc9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/ioprio_get.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(ioprio_get)
+ movl $__NR_ioprio_get, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(ioprio_get)
diff --git a/libc/arch-x86_64/syscalls/ioprio_set.S b/libc/arch-x86_64/syscalls/ioprio_set.S
new file mode 100644
index 0000000..bdbf559
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/ioprio_set.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(ioprio_set)
+ movl $__NR_ioprio_set, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(ioprio_set)
diff --git a/libc/arch-x86_64/syscalls/kill.S b/libc/arch-x86_64/syscalls/kill.S
new file mode 100644
index 0000000..d2773c6
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/kill.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(kill)
+ movl $__NR_kill, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(kill)
diff --git a/libc/arch-x86_64/syscalls/klogctl.S b/libc/arch-x86_64/syscalls/klogctl.S
new file mode 100644
index 0000000..8e1f8ba
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/klogctl.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(klogctl)
+ movl $__NR_syslog, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(klogctl)
diff --git a/libc/arch-x86_64/syscalls/lchown.S b/libc/arch-x86_64/syscalls/lchown.S
new file mode 100644
index 0000000..36a6f7a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/lchown.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(lchown)
+ movl $__NR_lchown, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(lchown)
diff --git a/libc/arch-x86_64/syscalls/lgetxattr.S b/libc/arch-x86_64/syscalls/lgetxattr.S
new file mode 100644
index 0000000..bc7d5f1
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/lgetxattr.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(lgetxattr)
+ movq %rcx, %r10
+ movl $__NR_lgetxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(lgetxattr)
diff --git a/libc/arch-x86_64/syscalls/link.S b/libc/arch-x86_64/syscalls/link.S
new file mode 100644
index 0000000..fa4b7d5
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/link.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(link)
+ movl $__NR_link, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(link)
diff --git a/libc/arch-x86_64/syscalls/listen.S b/libc/arch-x86_64/syscalls/listen.S
new file mode 100644
index 0000000..09111d4
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/listen.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(listen)
+ movl $__NR_listen, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(listen)
diff --git a/libc/arch-x86_64/syscalls/listxattr.S b/libc/arch-x86_64/syscalls/listxattr.S
new file mode 100644
index 0000000..726e3f6
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/listxattr.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(listxattr)
+ movl $__NR_listxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(listxattr)
diff --git a/libc/arch-x86_64/syscalls/llistxattr.S b/libc/arch-x86_64/syscalls/llistxattr.S
new file mode 100644
index 0000000..7714588
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/llistxattr.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(llistxattr)
+ movl $__NR_llistxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(llistxattr)
diff --git a/libc/arch-x86_64/syscalls/lremovexattr.S b/libc/arch-x86_64/syscalls/lremovexattr.S
new file mode 100644
index 0000000..cdaed46
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/lremovexattr.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(lremovexattr)
+ movl $__NR_lremovexattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(lremovexattr)
diff --git a/libc/arch-x86_64/syscalls/lseek.S b/libc/arch-x86_64/syscalls/lseek.S
new file mode 100644
index 0000000..9756315
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/lseek.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(lseek)
+ movl $__NR_lseek, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(lseek)
diff --git a/libc/arch-x86_64/syscalls/lsetxattr.S b/libc/arch-x86_64/syscalls/lsetxattr.S
new file mode 100644
index 0000000..4ef43b9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/lsetxattr.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(lsetxattr)
+ movq %rcx, %r10
+ movl $__NR_lsetxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(lsetxattr)
diff --git a/libc/arch-x86_64/syscalls/lstat.S b/libc/arch-x86_64/syscalls/lstat.S
new file mode 100644
index 0000000..425a0fa
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/lstat.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(lstat)
+ movl $__NR_lstat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(lstat)
diff --git a/libc/arch-x86_64/syscalls/madvise.S b/libc/arch-x86_64/syscalls/madvise.S
new file mode 100644
index 0000000..927b7a6
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/madvise.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(madvise)
+ movl $__NR_madvise, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(madvise)
diff --git a/libc/arch-x86_64/syscalls/mincore.S b/libc/arch-x86_64/syscalls/mincore.S
new file mode 100644
index 0000000..577e41f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mincore.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mincore)
+ movl $__NR_mincore, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mincore)
diff --git a/libc/arch-x86_64/syscalls/mkdir.S b/libc/arch-x86_64/syscalls/mkdir.S
new file mode 100644
index 0000000..7ce8e7f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mkdir.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mkdir)
+ movl $__NR_mkdir, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mkdir)
diff --git a/libc/arch-x86_64/syscalls/mkdirat.S b/libc/arch-x86_64/syscalls/mkdirat.S
new file mode 100644
index 0000000..3424611
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mkdirat.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mkdirat)
+ movl $__NR_mkdirat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mkdirat)
diff --git a/libc/arch-x86_64/syscalls/mknod.S b/libc/arch-x86_64/syscalls/mknod.S
new file mode 100644
index 0000000..a435592
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mknod.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mknod)
+ movl $__NR_mknod, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mknod)
diff --git a/libc/arch-x86_64/syscalls/mlock.S b/libc/arch-x86_64/syscalls/mlock.S
new file mode 100644
index 0000000..af2e72f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mlock.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mlock)
+ movl $__NR_mlock, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mlock)
diff --git a/libc/arch-x86_64/syscalls/mlockall.S b/libc/arch-x86_64/syscalls/mlockall.S
new file mode 100644
index 0000000..f9fd0e0
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mlockall.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mlockall)
+ movl $__NR_mlockall, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mlockall)
diff --git a/libc/arch-x86_64/syscalls/mmap.S b/libc/arch-x86_64/syscalls/mmap.S
new file mode 100644
index 0000000..4bf7d94
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mmap.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mmap)
+ movq %rcx, %r10
+ movl $__NR_mmap, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mmap)
diff --git a/libc/arch-x86_64/syscalls/mount.S b/libc/arch-x86_64/syscalls/mount.S
new file mode 100644
index 0000000..d09ca36
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mount.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mount)
+ movq %rcx, %r10
+ movl $__NR_mount, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mount)
diff --git a/libc/arch-x86_64/syscalls/mprotect.S b/libc/arch-x86_64/syscalls/mprotect.S
new file mode 100644
index 0000000..17dac16
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mprotect.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mprotect)
+ movl $__NR_mprotect, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mprotect)
diff --git a/libc/arch-x86_64/syscalls/mremap.S b/libc/arch-x86_64/syscalls/mremap.S
new file mode 100644
index 0000000..e8d4192
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/mremap.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(mremap)
+ movq %rcx, %r10
+ movl $__NR_mremap, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(mremap)
diff --git a/libc/arch-x86_64/syscalls/msync.S b/libc/arch-x86_64/syscalls/msync.S
new file mode 100644
index 0000000..6ea8de3
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/msync.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(msync)
+ movl $__NR_msync, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(msync)
diff --git a/libc/arch-x86_64/syscalls/munlock.S b/libc/arch-x86_64/syscalls/munlock.S
new file mode 100644
index 0000000..47a5308
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/munlock.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(munlock)
+ movl $__NR_munlock, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(munlock)
diff --git a/libc/arch-x86_64/syscalls/munlockall.S b/libc/arch-x86_64/syscalls/munlockall.S
new file mode 100644
index 0000000..f89ee71
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/munlockall.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(munlockall)
+ movl $__NR_munlockall, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(munlockall)
diff --git a/libc/arch-x86_64/syscalls/munmap.S b/libc/arch-x86_64/syscalls/munmap.S
new file mode 100644
index 0000000..5734dc3
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/munmap.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(munmap)
+ movl $__NR_munmap, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(munmap)
diff --git a/libc/arch-x86_64/syscalls/nanosleep.S b/libc/arch-x86_64/syscalls/nanosleep.S
new file mode 100644
index 0000000..0accaf4
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/nanosleep.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(nanosleep)
+ movl $__NR_nanosleep, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(nanosleep)
diff --git a/libc/arch-x86_64/syscalls/pause.S b/libc/arch-x86_64/syscalls/pause.S
new file mode 100644
index 0000000..118521f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/pause.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(pause)
+ movl $__NR_pause, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(pause)
diff --git a/libc/arch-x86_64/syscalls/perf_event_open.S b/libc/arch-x86_64/syscalls/perf_event_open.S
new file mode 100644
index 0000000..4cc6dea
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/perf_event_open.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(perf_event_open)
+ movq %rcx, %r10
+ movl $__NR_perf_event_open, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(perf_event_open)
diff --git a/libc/arch-x86_64/syscalls/personality.S b/libc/arch-x86_64/syscalls/personality.S
new file mode 100644
index 0000000..b98f1b9
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/personality.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(personality)
+ movl $__NR_personality, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(personality)
diff --git a/libc/arch-x86_64/syscalls/pipe.S b/libc/arch-x86_64/syscalls/pipe.S
new file mode 100644
index 0000000..3279a80
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/pipe.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(pipe)
+ movl $__NR_pipe, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(pipe)
diff --git a/libc/arch-x86_64/syscalls/pipe2.S b/libc/arch-x86_64/syscalls/pipe2.S
new file mode 100644
index 0000000..569df4f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/pipe2.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(pipe2)
+ movl $__NR_pipe2, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(pipe2)
diff --git a/libc/arch-x86_64/syscalls/poll.S b/libc/arch-x86_64/syscalls/poll.S
new file mode 100644
index 0000000..48462bd
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/poll.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(poll)
+ movl $__NR_poll, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(poll)
diff --git a/libc/arch-x86_64/syscalls/prctl.S b/libc/arch-x86_64/syscalls/prctl.S
new file mode 100644
index 0000000..712c556
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/prctl.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(prctl)
+ movq %rcx, %r10
+ movl $__NR_prctl, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(prctl)
diff --git a/libc/arch-x86_64/syscalls/pread64.S b/libc/arch-x86_64/syscalls/pread64.S
new file mode 100644
index 0000000..26c2522
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/pread64.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(pread64)
+ movq %rcx, %r10
+ movl $__NR_pread64, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(pread64)
diff --git a/libc/arch-x86_64/syscalls/pwrite64.S b/libc/arch-x86_64/syscalls/pwrite64.S
new file mode 100644
index 0000000..0d8d851
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/pwrite64.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(pwrite64)
+ movq %rcx, %r10
+ movl $__NR_pwrite64, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(pwrite64)
diff --git a/libc/arch-x86_64/syscalls/read.S b/libc/arch-x86_64/syscalls/read.S
new file mode 100644
index 0000000..51ba898
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/read.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(read)
+ movl $__NR_read, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(read)
diff --git a/libc/arch-x86_64/syscalls/readahead.S b/libc/arch-x86_64/syscalls/readahead.S
new file mode 100644
index 0000000..6eb6084
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/readahead.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(readahead)
+ movl $__NR_readahead, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(readahead)
diff --git a/libc/arch-x86_64/syscalls/readlink.S b/libc/arch-x86_64/syscalls/readlink.S
new file mode 100644
index 0000000..3183c77
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/readlink.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(readlink)
+ movl $__NR_readlink, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(readlink)
diff --git a/libc/arch-x86_64/syscalls/readv.S b/libc/arch-x86_64/syscalls/readv.S
new file mode 100644
index 0000000..3d9dfab
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/readv.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(readv)
+ movl $__NR_readv, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(readv)
diff --git a/libc/arch-x86_64/syscalls/recvfrom.S b/libc/arch-x86_64/syscalls/recvfrom.S
new file mode 100644
index 0000000..7f4aab2
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/recvfrom.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(recvfrom)
+ movq %rcx, %r10
+ movl $__NR_recvfrom, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(recvfrom)
diff --git a/libc/arch-x86_64/syscalls/recvmsg.S b/libc/arch-x86_64/syscalls/recvmsg.S
new file mode 100644
index 0000000..759b5b5
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/recvmsg.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(recvmsg)
+ movl $__NR_recvmsg, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(recvmsg)
diff --git a/libc/arch-x86_64/syscalls/removexattr.S b/libc/arch-x86_64/syscalls/removexattr.S
new file mode 100644
index 0000000..4c73eaf
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/removexattr.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(removexattr)
+ movl $__NR_removexattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(removexattr)
diff --git a/libc/arch-x86_64/syscalls/rename.S b/libc/arch-x86_64/syscalls/rename.S
new file mode 100644
index 0000000..c1704db
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/rename.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(rename)
+ movl $__NR_rename, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(rename)
diff --git a/libc/arch-x86_64/syscalls/renameat.S b/libc/arch-x86_64/syscalls/renameat.S
new file mode 100644
index 0000000..a68d2cf
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/renameat.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(renameat)
+ movq %rcx, %r10
+ movl $__NR_renameat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(renameat)
diff --git a/libc/arch-x86_64/syscalls/rmdir.S b/libc/arch-x86_64/syscalls/rmdir.S
new file mode 100644
index 0000000..6cfcb71
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/rmdir.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(rmdir)
+ movl $__NR_rmdir, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(rmdir)
diff --git a/libc/arch-x86_64/syscalls/sched_get_priority_max.S b/libc/arch-x86_64/syscalls/sched_get_priority_max.S
new file mode 100644
index 0000000..d2ce51f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_get_priority_max.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_get_priority_max)
+ movl $__NR_sched_get_priority_max, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_get_priority_max)
diff --git a/libc/arch-x86_64/syscalls/sched_get_priority_min.S b/libc/arch-x86_64/syscalls/sched_get_priority_min.S
new file mode 100644
index 0000000..743503b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_get_priority_min.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_get_priority_min)
+ movl $__NR_sched_get_priority_min, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_get_priority_min)
diff --git a/libc/arch-x86_64/syscalls/sched_getparam.S b/libc/arch-x86_64/syscalls/sched_getparam.S
new file mode 100644
index 0000000..6aa0a08
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_getparam.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_getparam)
+ movl $__NR_sched_getparam, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_getparam)
diff --git a/libc/arch-x86_64/syscalls/sched_getscheduler.S b/libc/arch-x86_64/syscalls/sched_getscheduler.S
new file mode 100644
index 0000000..57e4400
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_getscheduler.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_getscheduler)
+ movl $__NR_sched_getscheduler, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_getscheduler)
diff --git a/libc/arch-x86_64/syscalls/sched_rr_get_interval.S b/libc/arch-x86_64/syscalls/sched_rr_get_interval.S
new file mode 100644
index 0000000..d46c054
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_rr_get_interval.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_rr_get_interval)
+ movl $__NR_sched_rr_get_interval, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_rr_get_interval)
diff --git a/libc/arch-x86_64/syscalls/sched_setaffinity.S b/libc/arch-x86_64/syscalls/sched_setaffinity.S
new file mode 100644
index 0000000..d3fb89b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_setaffinity.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_setaffinity)
+ movl $__NR_sched_setaffinity, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_setaffinity)
diff --git a/libc/arch-x86_64/syscalls/sched_setparam.S b/libc/arch-x86_64/syscalls/sched_setparam.S
new file mode 100644
index 0000000..c5dd029
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_setparam.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_setparam)
+ movl $__NR_sched_setparam, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_setparam)
diff --git a/libc/arch-x86_64/syscalls/sched_setscheduler.S b/libc/arch-x86_64/syscalls/sched_setscheduler.S
new file mode 100644
index 0000000..90d013d
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_setscheduler.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_setscheduler)
+ movl $__NR_sched_setscheduler, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_setscheduler)
diff --git a/libc/arch-x86_64/syscalls/sched_yield.S b/libc/arch-x86_64/syscalls/sched_yield.S
new file mode 100644
index 0000000..5191560
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sched_yield.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sched_yield)
+ movl $__NR_sched_yield, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sched_yield)
diff --git a/libc/arch-x86_64/syscalls/select.S b/libc/arch-x86_64/syscalls/select.S
new file mode 100644
index 0000000..91c3a72
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/select.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(select)
+ movq %rcx, %r10
+ movl $__NR_select, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(select)
diff --git a/libc/arch-x86_64/syscalls/sendfile.S b/libc/arch-x86_64/syscalls/sendfile.S
new file mode 100644
index 0000000..37a7bcd
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sendfile.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sendfile)
+ movq %rcx, %r10
+ movl $__NR_sendfile, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sendfile)
diff --git a/libc/arch-x86_64/syscalls/sendmsg.S b/libc/arch-x86_64/syscalls/sendmsg.S
new file mode 100644
index 0000000..24c5534
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sendmsg.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sendmsg)
+ movl $__NR_sendmsg, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sendmsg)
diff --git a/libc/arch-x86_64/syscalls/sendto.S b/libc/arch-x86_64/syscalls/sendto.S
new file mode 100644
index 0000000..a03094c
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sendto.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sendto)
+ movq %rcx, %r10
+ movl $__NR_sendto, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sendto)
diff --git a/libc/arch-x86_64/syscalls/setgid.S b/libc/arch-x86_64/syscalls/setgid.S
new file mode 100644
index 0000000..5b0cb6c
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setgid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setgid)
+ movl $__NR_setgid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setgid)
diff --git a/libc/arch-x86_64/syscalls/setgroups.S b/libc/arch-x86_64/syscalls/setgroups.S
new file mode 100644
index 0000000..e797bae
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setgroups.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setgroups)
+ movl $__NR_setgroups, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setgroups)
diff --git a/libc/arch-x86_64/syscalls/setitimer.S b/libc/arch-x86_64/syscalls/setitimer.S
new file mode 100644
index 0000000..3227745
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setitimer.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setitimer)
+ movl $__NR_setitimer, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setitimer)
diff --git a/libc/arch-x86_64/syscalls/setpgid.S b/libc/arch-x86_64/syscalls/setpgid.S
new file mode 100644
index 0000000..2e9ed27
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setpgid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setpgid)
+ movl $__NR_setpgid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setpgid)
diff --git a/libc/arch-x86_64/syscalls/setpriority.S b/libc/arch-x86_64/syscalls/setpriority.S
new file mode 100644
index 0000000..98048ae
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setpriority.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setpriority)
+ movl $__NR_setpriority, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setpriority)
diff --git a/libc/arch-x86_64/syscalls/setregid.S b/libc/arch-x86_64/syscalls/setregid.S
new file mode 100644
index 0000000..713dd68
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setregid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setregid)
+ movl $__NR_setregid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setregid)
diff --git a/libc/arch-x86_64/syscalls/setresgid.S b/libc/arch-x86_64/syscalls/setresgid.S
new file mode 100644
index 0000000..eadc312
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setresgid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setresgid)
+ movl $__NR_setresgid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setresgid)
diff --git a/libc/arch-x86_64/syscalls/setrlimit.S b/libc/arch-x86_64/syscalls/setrlimit.S
new file mode 100644
index 0000000..cee2451
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setrlimit.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setrlimit)
+ movl $__NR_setrlimit, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setrlimit)
diff --git a/libc/arch-x86_64/syscalls/setsid.S b/libc/arch-x86_64/syscalls/setsid.S
new file mode 100644
index 0000000..882b8ee
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setsid.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setsid)
+ movl $__NR_setsid, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setsid)
diff --git a/libc/arch-x86_64/syscalls/setsockopt.S b/libc/arch-x86_64/syscalls/setsockopt.S
new file mode 100644
index 0000000..37de9c0
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setsockopt.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setsockopt)
+ movq %rcx, %r10
+ movl $__NR_setsockopt, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setsockopt)
diff --git a/libc/arch-x86_64/syscalls/settimeofday.S b/libc/arch-x86_64/syscalls/settimeofday.S
new file mode 100644
index 0000000..d5644bd
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/settimeofday.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(settimeofday)
+ movl $__NR_settimeofday, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(settimeofday)
diff --git a/libc/arch-x86_64/syscalls/setxattr.S b/libc/arch-x86_64/syscalls/setxattr.S
new file mode 100644
index 0000000..ffc3b1c
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/setxattr.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(setxattr)
+ movq %rcx, %r10
+ movl $__NR_setxattr, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(setxattr)
diff --git a/libc/arch-x86_64/syscalls/shutdown.S b/libc/arch-x86_64/syscalls/shutdown.S
new file mode 100644
index 0000000..471593b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/shutdown.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(shutdown)
+ movl $__NR_shutdown, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(shutdown)
diff --git a/libc/arch-x86_64/syscalls/sigaltstack.S b/libc/arch-x86_64/syscalls/sigaltstack.S
new file mode 100644
index 0000000..71fd066
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sigaltstack.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sigaltstack)
+ movl $__NR_sigaltstack, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sigaltstack)
diff --git a/libc/arch-x86_64/syscalls/signalfd4.S b/libc/arch-x86_64/syscalls/signalfd4.S
new file mode 100644
index 0000000..545b957
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/signalfd4.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(signalfd4)
+ movq %rcx, %r10
+ movl $__NR_signalfd4, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(signalfd4)
diff --git a/libc/arch-x86_64/syscalls/socket.S b/libc/arch-x86_64/syscalls/socket.S
new file mode 100644
index 0000000..7407a40
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/socket.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(socket)
+ movl $__NR_socket, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(socket)
diff --git a/libc/arch-x86_64/syscalls/socketpair.S b/libc/arch-x86_64/syscalls/socketpair.S
new file mode 100644
index 0000000..06bb137
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/socketpair.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(socketpair)
+ movq %rcx, %r10
+ movl $__NR_socketpair, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(socketpair)
diff --git a/libc/arch-x86_64/syscalls/stat.S b/libc/arch-x86_64/syscalls/stat.S
new file mode 100644
index 0000000..c71d1be
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/stat.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(stat)
+ movl $__NR_stat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(stat)
diff --git a/libc/arch-x86_64/syscalls/statfs.S b/libc/arch-x86_64/syscalls/statfs.S
new file mode 100644
index 0000000..b0c3861
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/statfs.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(statfs)
+ movl $__NR_statfs, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(statfs)
diff --git a/libc/arch-x86_64/syscalls/swapoff.S b/libc/arch-x86_64/syscalls/swapoff.S
new file mode 100644
index 0000000..75a7a82
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/swapoff.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(swapoff)
+ movl $__NR_swapoff, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(swapoff)
diff --git a/libc/arch-x86_64/syscalls/swapon.S b/libc/arch-x86_64/syscalls/swapon.S
new file mode 100644
index 0000000..bd2aa08
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/swapon.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(swapon)
+ movl $__NR_swapon, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(swapon)
diff --git a/libc/arch-x86_64/syscalls/symlink.S b/libc/arch-x86_64/syscalls/symlink.S
new file mode 100644
index 0000000..285b680
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/symlink.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(symlink)
+ movl $__NR_symlink, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(symlink)
diff --git a/libc/arch-x86_64/syscalls/sync.S b/libc/arch-x86_64/syscalls/sync.S
new file mode 100644
index 0000000..d1f632f
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sync.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sync)
+ movl $__NR_sync, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sync)
diff --git a/libc/arch-x86_64/syscalls/sysinfo.S b/libc/arch-x86_64/syscalls/sysinfo.S
new file mode 100644
index 0000000..5f852bd
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/sysinfo.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(sysinfo)
+ movl $__NR_sysinfo, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(sysinfo)
diff --git a/libc/arch-x86_64/syscalls/tgkill.S b/libc/arch-x86_64/syscalls/tgkill.S
new file mode 100644
index 0000000..f494098
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/tgkill.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(tgkill)
+ movl $__NR_tgkill, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(tgkill)
diff --git a/libc/arch-x86_64/syscalls/timerfd_create.S b/libc/arch-x86_64/syscalls/timerfd_create.S
new file mode 100644
index 0000000..98d4ec3
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/timerfd_create.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(timerfd_create)
+ movl $__NR_timerfd_create, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(timerfd_create)
diff --git a/libc/arch-x86_64/syscalls/timerfd_gettime.S b/libc/arch-x86_64/syscalls/timerfd_gettime.S
new file mode 100644
index 0000000..75f7eff
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/timerfd_gettime.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(timerfd_gettime)
+ movl $__NR_timerfd_gettime, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(timerfd_gettime)
diff --git a/libc/arch-x86_64/syscalls/timerfd_settime.S b/libc/arch-x86_64/syscalls/timerfd_settime.S
new file mode 100644
index 0000000..3c3d7bb
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/timerfd_settime.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(timerfd_settime)
+ movq %rcx, %r10
+ movl $__NR_timerfd_settime, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(timerfd_settime)
diff --git a/libc/arch-x86_64/syscalls/times.S b/libc/arch-x86_64/syscalls/times.S
new file mode 100644
index 0000000..a4a76ac
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/times.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(times)
+ movl $__NR_times, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(times)
diff --git a/libc/arch-x86_64/syscalls/tkill.S b/libc/arch-x86_64/syscalls/tkill.S
new file mode 100644
index 0000000..6289479
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/tkill.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(tkill)
+ movl $__NR_tkill, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(tkill)
diff --git a/libc/arch-x86_64/syscalls/truncate.S b/libc/arch-x86_64/syscalls/truncate.S
new file mode 100644
index 0000000..0e1571b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/truncate.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(truncate)
+ movl $__NR_truncate, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(truncate)
diff --git a/libc/arch-x86_64/syscalls/umask.S b/libc/arch-x86_64/syscalls/umask.S
new file mode 100644
index 0000000..e301c71
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/umask.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(umask)
+ movl $__NR_umask, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(umask)
diff --git a/libc/arch-x86_64/syscalls/umount2.S b/libc/arch-x86_64/syscalls/umount2.S
new file mode 100644
index 0000000..c2c0e4c
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/umount2.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(umount2)
+ movl $__NR_umount2, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(umount2)
diff --git a/libc/arch-x86_64/syscalls/uname.S b/libc/arch-x86_64/syscalls/uname.S
new file mode 100644
index 0000000..829963a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/uname.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(uname)
+ movl $__NR_uname, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(uname)
diff --git a/libc/arch-x86_64/syscalls/unlink.S b/libc/arch-x86_64/syscalls/unlink.S
new file mode 100644
index 0000000..033828b
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/unlink.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(unlink)
+ movl $__NR_unlink, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(unlink)
diff --git a/libc/arch-x86_64/syscalls/unlinkat.S b/libc/arch-x86_64/syscalls/unlinkat.S
new file mode 100644
index 0000000..54ac28a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/unlinkat.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(unlinkat)
+ movl $__NR_unlinkat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(unlinkat)
diff --git a/libc/arch-x86_64/syscalls/unshare.S b/libc/arch-x86_64/syscalls/unshare.S
new file mode 100644
index 0000000..706e31a
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/unshare.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(unshare)
+ movl $__NR_unshare, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(unshare)
diff --git a/libc/arch-x86_64/syscalls/utimensat.S b/libc/arch-x86_64/syscalls/utimensat.S
new file mode 100644
index 0000000..426f7fd
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/utimensat.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(utimensat)
+ movq %rcx, %r10
+ movl $__NR_utimensat, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(utimensat)
diff --git a/libc/arch-x86_64/syscalls/utimes.S b/libc/arch-x86_64/syscalls/utimes.S
new file mode 100644
index 0000000..5eef3eb
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/utimes.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(utimes)
+ movl $__NR_utimes, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(utimes)
diff --git a/libc/arch-x86_64/syscalls/vfork.S b/libc/arch-x86_64/syscalls/vfork.S
new file mode 100644
index 0000000..eb69562
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/vfork.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(vfork)
+ movl $__NR_vfork, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(vfork)
diff --git a/libc/arch-x86_64/syscalls/wait4.S b/libc/arch-x86_64/syscalls/wait4.S
new file mode 100644
index 0000000..1608a59
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/wait4.S
@@ -0,0 +1,18 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(wait4)
+ movq %rcx, %r10
+ movl $__NR_wait4, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(wait4)
diff --git a/libc/arch-x86_64/syscalls/write.S b/libc/arch-x86_64/syscalls/write.S
new file mode 100644
index 0000000..f1d18cb
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/write.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(write)
+ movl $__NR_write, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(write)
diff --git a/libc/arch-x86_64/syscalls/writev.S b/libc/arch-x86_64/syscalls/writev.S
new file mode 100644
index 0000000..c4727f8
--- /dev/null
+++ b/libc/arch-x86_64/syscalls/writev.S
@@ -0,0 +1,17 @@
+/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(writev)
+ movl $__NR_writev, %eax
+ syscall
+ cmpq $-MAX_ERRNO, %rax
+ jb 1f
+ negl %eax
+ movl %eax, %edi
+ call __set_errno
+ orq $-1, %rax
+1:
+ ret
+END(writev)
diff --git a/libc/arch-x86_64/x86_64.mk b/libc/arch-x86_64/x86_64.mk
new file mode 100644
index 0000000..6a2bb9c
--- /dev/null
+++ b/libc/arch-x86_64/x86_64.mk
@@ -0,0 +1,19 @@
+_LIBC_ARCH_COMMON_SRC_FILES := \
+ arch-x86_64/bionic/__get_sp.S \
+ arch-x86_64/bionic/__get_tls.c \
+ arch-x86_64/bionic/__set_tls.c \
+ arch-x86_64/bionic/clone.S \
+ arch-x86_64/bionic/_exit_with_stack_teardown.S \
+ arch-x86_64/bionic/futex_x86_64.S \
+ arch-x86_64/bionic/setjmp.S \
+ arch-x86_64/bionic/_setjmp.S \
+ arch-x86_64/bionic/sigsetjmp.S \
+ arch-x86_64/bionic/syscall.S \
+ arch-x86_64/bionic/sigprocmask.c \
+ arch-x86_64/bionic/sigaction.c \
+ arch-x86_64/bionic/sigsuspend.c \
+
+_LIBC_ARCH_STATIC_SRC_FILES := \
+ bionic/dl_iterate_phdr_static.c \
+
+_LIBC_ARCH_DYNAMIC_SRC_FILES :=
diff --git a/libc/bionic/malloc_debug_qemu.cpp b/libc/bionic/malloc_debug_qemu.cpp
index 4c666a9..1f64aa8 100644
--- a/libc/bionic/malloc_debug_qemu.cpp
+++ b/libc/bionic/malloc_debug_qemu.cpp
@@ -684,7 +684,7 @@
desc.suffix_size = DEFAULT_SUFFIX_SIZE;
desc.ptr = dlmalloc(mallocdesc_alloc_size(&desc));
if (desc.ptr == NULL) {
- qemu_error_log("<libc_pid=%03u, pid=%03u> malloc(%u): dlmalloc(%u) failed.",
+ qemu_error_log("<libc_pid=%03u, pid=%03u> malloc(%zd): dlmalloc(%u) failed.",
malloc_pid, getpid(), bytes, mallocdesc_alloc_size(&desc));
return NULL;
}
@@ -699,7 +699,7 @@
#if TEST_ACCESS_VIOLATIONS
test_access_violation(&desc);
#endif // TEST_ACCESS_VIOLATIONS
- log_mdesc(info, &desc, "+++ <libc_pid=%03u, pid=%03u> malloc(%u) -> ",
+ log_mdesc(info, &desc, "+++ <libc_pid=%03u, pid=%03u> malloc(%zd) -> ",
malloc_pid, getpid(), bytes);
return mallocdesc_user_ptr(&desc);
}
@@ -797,14 +797,14 @@
}
desc.ptr = dlcalloc(total_elements, elem_size);
if (desc.ptr == NULL) {
- error_log("<libc_pid=%03u, pid=%03u> calloc: dlcalloc(%u(%u), %u) (prx=%u, sfx=%u) failed.",
+ error_log("<libc_pid=%03u, pid=%03u> calloc: dlcalloc(%zd(%zd), %zd) (prx=%u, sfx=%u) failed.",
malloc_pid, getpid(), n_elements, total_elements, elem_size,
desc.prefix_size, desc.suffix_size);
return NULL;
}
if (notify_qemu_malloc(&desc)) {
- log_mdesc(error, &desc, "<libc_pid=%03u, pid=%03u>: calloc(%u(%u), %u): notify_malloc failed for ",
+ log_mdesc(error, &desc, "<libc_pid=%03u, pid=%03u>: calloc(%zd(%zd), %zd): notify_malloc failed for ",
malloc_pid, getpid(), n_elements, total_elements, elem_size);
dlfree(desc.ptr);
return NULL;
@@ -812,7 +812,7 @@
#if TEST_ACCESS_VIOLATIONS
test_access_violation(&desc);
#endif // TEST_ACCESS_VIOLATIONS
- log_mdesc(info, &desc, "### <libc_pid=%03u, pid=%03u> calloc(%u(%u), %u) -> ",
+ log_mdesc(info, &desc, "### <libc_pid=%03u, pid=%03u> calloc(%zd(%zd), %zd) -> ",
malloc_pid, getpid(), n_elements, total_elements, elem_size);
return mallocdesc_user_ptr(&desc);
}
@@ -832,14 +832,14 @@
if (mem == NULL) {
// Nothing to realloc. just do regular malloc.
- qemu_info_log("::: <libc_pid=%03u, pid=%03u>: realloc(%p, %u) redir to malloc",
+ qemu_info_log("::: <libc_pid=%03u, pid=%03u>: realloc(%p, %zd) redir to malloc",
malloc_pid, getpid(), mem, bytes);
return qemu_instrumented_malloc(bytes);
}
if (bytes == 0) {
// This is a "free" condition.
- qemu_info_log("::: <libc_pid=%03u, pid=%03u>: realloc(%p, %u) redir to free and malloc",
+ qemu_info_log("::: <libc_pid=%03u, pid=%03u>: realloc(%p, %zd) redir to free and malloc",
malloc_pid, getpid(), mem, bytes);
qemu_instrumented_free(mem);
@@ -850,7 +850,7 @@
// Query emulator for the reallocating block information.
if (query_qemu_malloc_info(mem, &cur_desc, 2)) {
// Note that this violation should be already caught in the emulator.
- error_log("<libc_pid=%03u, pid=%03u>: realloc(%p, %u) query_info failed.",
+ error_log("<libc_pid=%03u, pid=%03u>: realloc(%p, %zd) query_info failed.",
malloc_pid, getpid(), mem, bytes);
return NULL;
}
@@ -863,7 +863,7 @@
* for this memory block. Note that this violation should be already caught
* in the emulator.*/
if (mem != mallocdesc_user_ptr(&cur_desc)) {
- log_mdesc(error, &cur_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %u) is invalid for ",
+ log_mdesc(error, &cur_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %zd) is invalid for ",
malloc_pid, getpid(), mem, bytes);
return NULL;
}
@@ -879,7 +879,7 @@
new_desc.suffix_size = DEFAULT_SUFFIX_SIZE;
new_desc.ptr = dlmalloc(mallocdesc_alloc_size(&new_desc));
if (new_desc.ptr == NULL) {
- log_mdesc(error, &cur_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %u): dlmalloc(%u) failed on ",
+ log_mdesc(error, &cur_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %zd): dlmalloc(%u) failed on ",
malloc_pid, getpid(), mem, bytes,
mallocdesc_alloc_size(&new_desc));
return NULL;
@@ -895,7 +895,7 @@
// Register new block with emulator.
if (notify_qemu_malloc(&new_desc)) {
- log_mdesc(error, &new_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %u) notify_malloc failed -> ",
+ log_mdesc(error, &new_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %zd) notify_malloc failed -> ",
malloc_pid, getpid(), mem, bytes);
log_mdesc(error, &cur_desc, " <- ");
dlfree(new_desc.ptr);
@@ -908,7 +908,7 @@
// Free old block.
if (notify_qemu_free(mem)) {
- log_mdesc(error, &cur_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %u): notify_free failed for ",
+ log_mdesc(error, &cur_desc, "<libc_pid=%03u, pid=%03u>: realloc(%p, %zd): notify_free failed for ",
malloc_pid, getpid(), mem, bytes);
/* Since we registered new decriptor with the emulator, we need
* to unregister it before freeing newly allocated block. */
@@ -918,7 +918,7 @@
}
dlfree(cur_desc.ptr);
- log_mdesc(info, &new_desc, "=== <libc_pid=%03u, pid=%03u>: realloc(%p, %u) -> ",
+ log_mdesc(info, &new_desc, "=== <libc_pid=%03u, pid=%03u>: realloc(%p, %zd) -> ",
malloc_pid, getpid(), mem, bytes);
log_mdesc(info, &cur_desc, " <- ");
@@ -933,7 +933,7 @@
if (bytes == 0) {
// Just let go zero bytes allocation.
- qemu_info_log("::: <libc_pid=%03u, pid=%03u>: memalign(%X, %u) redir to malloc",
+ qemu_info_log("::: <libc_pid=%03u, pid=%03u>: memalign(%zx, %zd) redir to malloc",
malloc_pid, getpid(), alignment, bytes);
return qemu_instrumented_malloc(0);
}
@@ -948,13 +948,13 @@
desc.suffix_size = DEFAULT_SUFFIX_SIZE;
desc.ptr = dlmemalign(desc.prefix_size, mallocdesc_alloc_size(&desc));
if (desc.ptr == NULL) {
- error_log("<libc_pid=%03u, pid=%03u> memalign(%X, %u): dlmalloc(%u) failed.",
+ error_log("<libc_pid=%03u, pid=%03u> memalign(%zx, %zd): dlmalloc(%u) failed.",
malloc_pid, getpid(), alignment, bytes,
mallocdesc_alloc_size(&desc));
return NULL;
}
if (notify_qemu_malloc(&desc)) {
- log_mdesc(error, &desc, "<libc_pid=%03u, pid=%03u>: memalign(%X, %u): notify_malloc failed for ",
+ log_mdesc(error, &desc, "<libc_pid=%03u, pid=%03u>: memalign(%zx, %zd): notify_malloc failed for ",
malloc_pid, getpid(), alignment, bytes);
dlfree(desc.ptr);
return NULL;
@@ -964,7 +964,7 @@
test_access_violation(&desc);
#endif // TEST_ACCESS_VIOLATIONS
- log_mdesc(info, &desc, "@@@ <libc_pid=%03u, pid=%03u> memalign(%X, %u) -> ",
+ log_mdesc(info, &desc, "@@@ <libc_pid=%03u, pid=%03u> memalign(%zx, %zd) -> ",
malloc_pid, getpid(), alignment, bytes);
return mallocdesc_user_ptr(&desc);
}
diff --git a/libc/bionic/pthread_attr.cpp b/libc/bionic/pthread_attr.cpp
index 2763b0c..dfb740d 100644
--- a/libc/bionic/pthread_attr.cpp
+++ b/libc/bionic/pthread_attr.cpp
@@ -111,7 +111,7 @@
if ((stack_size & (PAGE_SIZE - 1) || stack_size < PTHREAD_STACK_MIN)) {
return EINVAL;
}
- if ((uint32_t)stack_base & (PAGE_SIZE - 1)) {
+ if (reinterpret_cast<uintptr_t>(stack_base) & (PAGE_SIZE - 1)) {
return EINVAL;
}
attr->stack_base = stack_base;
diff --git a/libc/bionic/pthread_key.cpp b/libc/bionic/pthread_key.cpp
index 2ae6519..7e8b4cd 100644
--- a/libc/bionic/pthread_key.cpp
+++ b/libc/bionic/pthread_key.cpp
@@ -239,7 +239,8 @@
// to check that the key is properly allocated. If the key was not
// allocated, the value read from the TLS should always be NULL
// due to pthread_key_delete() clearing the values for all threads.
- return (void *)(((unsigned *)__get_tls())[key]);
+ uintptr_t address = reinterpret_cast<volatile uintptr_t*>(__get_tls())[key];
+ return reinterpret_cast<void*>(address);
}
int pthread_setspecific(pthread_key_t key, const void* ptr) {
@@ -249,6 +250,6 @@
return EINVAL;
}
- ((uint32_t *)__get_tls())[key] = (uint32_t)ptr;
+ reinterpret_cast<volatile uintptr_t*>(__get_tls())[key] = reinterpret_cast<uintptr_t>(ptr);
return 0;
}
diff --git a/libc/include/sys/glibc-syscalls.h b/libc/include/sys/glibc-syscalls.h
index 44f37c8..8a88c75 100644
--- a/libc/include/sys/glibc-syscalls.h
+++ b/libc/include/sys/glibc-syscalls.h
@@ -1046,5 +1046,317 @@
#define SYS_waitpid __NR_waitpid
#define SYS_write __NR_write
#define SYS_writev __NR_writev
+#elif defined(__x86_64__)
+#define SYS_accept __NR_accept
+#define SYS_accept4 __NR_accept4
+#define SYS_access __NR_access
+#define SYS_acct __NR_acct
+#define SYS_add_key __NR_add_key
+#define SYS_adjtimex __NR_adjtimex
+#define SYS_afs_syscall __NR_afs_syscall
+#define SYS_alarm __NR_alarm
+#define SYS_arch_prctl __NR_arch_prctl
+#define SYS_bind __NR_bind
+#define SYS_brk __NR_brk
+#define SYS_capget __NR_capget
+#define SYS_capset __NR_capset
+#define SYS_chdir __NR_chdir
+#define SYS_chmod __NR_chmod
+#define SYS_chown __NR_chown
+#define SYS_chroot __NR_chroot
+#define SYS_clock_adjtime __NR_clock_adjtime
+#define SYS_clock_getres __NR_clock_getres
+#define SYS_clock_gettime __NR_clock_gettime
+#define SYS_clock_nanosleep __NR_clock_nanosleep
+#define SYS_clock_settime __NR_clock_settime
+#define SYS_clone __NR_clone
+#define SYS_close __NR_close
+#define SYS_connect __NR_connect
+#define SYS_creat __NR_creat
+#define SYS_create_module __NR_create_module
+#define SYS_delete_module __NR_delete_module
+#define SYS_dup __NR_dup
+#define SYS_dup2 __NR_dup2
+#define SYS_dup3 __NR_dup3
+#define SYS_epoll_create __NR_epoll_create
+#define SYS_epoll_create1 __NR_epoll_create1
+#define SYS_epoll_ctl __NR_epoll_ctl
+#define SYS_epoll_ctl_old __NR_epoll_ctl_old
+#define SYS_epoll_pwait __NR_epoll_pwait
+#define SYS_epoll_wait __NR_epoll_wait
+#define SYS_epoll_wait_old __NR_epoll_wait_old
+#define SYS_eventfd __NR_eventfd
+#define SYS_eventfd2 __NR_eventfd2
+#define SYS_execve __NR_execve
+#define SYS_exit __NR_exit
+#define SYS_exit_group __NR_exit_group
+#define SYS_faccessat __NR_faccessat
+#define SYS_fadvise64 __NR_fadvise64
+#define SYS_fallocate __NR_fallocate
+#define SYS_fanotify_init __NR_fanotify_init
+#define SYS_fanotify_mark __NR_fanotify_mark
+#define SYS_fchdir __NR_fchdir
+#define SYS_fchmod __NR_fchmod
+#define SYS_fchmodat __NR_fchmodat
+#define SYS_fchown __NR_fchown
+#define SYS_fchownat __NR_fchownat
+#define SYS_fcntl __NR_fcntl
+#define SYS_fdatasync __NR_fdatasync
+#define SYS_fgetxattr __NR_fgetxattr
+#define SYS_flistxattr __NR_flistxattr
+#define SYS_flock __NR_flock
+#define SYS_fork __NR_fork
+#define SYS_fremovexattr __NR_fremovexattr
+#define SYS_fsetxattr __NR_fsetxattr
+#define SYS_fstat __NR_fstat
+#define SYS_fstatfs __NR_fstatfs
+#define SYS_fsync __NR_fsync
+#define SYS_ftruncate __NR_ftruncate
+#define SYS_futex __NR_futex
+#define SYS_futimesat __NR_futimesat
+#define SYS_get_kernel_syms __NR_get_kernel_syms
+#define SYS_get_mempolicy __NR_get_mempolicy
+#define SYS_get_robust_list __NR_get_robust_list
+#define SYS_get_thread_area __NR_get_thread_area
+#define SYS_getcpu __NR_getcpu
+#define SYS_getcwd __NR_getcwd
+#define SYS_getdents __NR_getdents
+#define SYS_getdents64 __NR_getdents64
+#define SYS_getegid __NR_getegid
+#define SYS_geteuid __NR_geteuid
+#define SYS_getgid __NR_getgid
+#define SYS_getgroups __NR_getgroups
+#define SYS_getitimer __NR_getitimer
+#define SYS_getpeername __NR_getpeername
+#define SYS_getpgid __NR_getpgid
+#define SYS_getpgrp __NR_getpgrp
+#define SYS_getpid __NR_getpid
+#define SYS_getpmsg __NR_getpmsg
+#define SYS_getppid __NR_getppid
+#define SYS_getpriority __NR_getpriority
+#define SYS_getresgid __NR_getresgid
+#define SYS_getresuid __NR_getresuid
+#define SYS_getrlimit __NR_getrlimit
+#define SYS_getrusage __NR_getrusage
+#define SYS_getsid __NR_getsid
+#define SYS_getsockname __NR_getsockname
+#define SYS_getsockopt __NR_getsockopt
+#define SYS_gettid __NR_gettid
+#define SYS_gettimeofday __NR_gettimeofday
+#define SYS_getuid __NR_getuid
+#define SYS_getxattr __NR_getxattr
+#define SYS_init_module __NR_init_module
+#define SYS_inotify_add_watch __NR_inotify_add_watch
+#define SYS_inotify_init __NR_inotify_init
+#define SYS_inotify_init1 __NR_inotify_init1
+#define SYS_inotify_rm_watch __NR_inotify_rm_watch
+#define SYS_io_cancel __NR_io_cancel
+#define SYS_io_destroy __NR_io_destroy
+#define SYS_io_getevents __NR_io_getevents
+#define SYS_io_setup __NR_io_setup
+#define SYS_io_submit __NR_io_submit
+#define SYS_ioctl __NR_ioctl
+#define SYS_ioperm __NR_ioperm
+#define SYS_iopl __NR_iopl
+#define SYS_ioprio_get __NR_ioprio_get
+#define SYS_ioprio_set __NR_ioprio_set
+#define SYS_kexec_load __NR_kexec_load
+#define SYS_keyctl __NR_keyctl
+#define SYS_kill __NR_kill
+#define SYS_lchown __NR_lchown
+#define SYS_lgetxattr __NR_lgetxattr
+#define SYS_link __NR_link
+#define SYS_linkat __NR_linkat
+#define SYS_listen __NR_listen
+#define SYS_listxattr __NR_listxattr
+#define SYS_llistxattr __NR_llistxattr
+#define SYS_lookup_dcookie __NR_lookup_dcookie
+#define SYS_lremovexattr __NR_lremovexattr
+#define SYS_lseek __NR_lseek
+#define SYS_lsetxattr __NR_lsetxattr
+#define SYS_lstat __NR_lstat
+#define SYS_madvise __NR_madvise
+#define SYS_mbind __NR_mbind
+#define SYS_migrate_pages __NR_migrate_pages
+#define SYS_mincore __NR_mincore
+#define SYS_mkdir __NR_mkdir
+#define SYS_mkdirat __NR_mkdirat
+#define SYS_mknod __NR_mknod
+#define SYS_mknodat __NR_mknodat
+#define SYS_mlock __NR_mlock
+#define SYS_mlockall __NR_mlockall
+#define SYS_mmap __NR_mmap
+#define SYS_modify_ldt __NR_modify_ldt
+#define SYS_mount __NR_mount
+#define SYS_move_pages __NR_move_pages
+#define SYS_mprotect __NR_mprotect
+#define SYS_mq_getsetattr __NR_mq_getsetattr
+#define SYS_mq_notify __NR_mq_notify
+#define SYS_mq_open __NR_mq_open
+#define SYS_mq_timedreceive __NR_mq_timedreceive
+#define SYS_mq_timedsend __NR_mq_timedsend
+#define SYS_mq_unlink __NR_mq_unlink
+#define SYS_mremap __NR_mremap
+#define SYS_msgctl __NR_msgctl
+#define SYS_msgget __NR_msgget
+#define SYS_msgrcv __NR_msgrcv
+#define SYS_msgsnd __NR_msgsnd
+#define SYS_msync __NR_msync
+#define SYS_munlock __NR_munlock
+#define SYS_munlockall __NR_munlockall
+#define SYS_munmap __NR_munmap
+#define SYS_name_to_handle_at __NR_name_to_handle_at
+#define SYS_nanosleep __NR_nanosleep
+#define SYS_newfstatat __NR_newfstatat
+#define SYS_nfsservctl __NR_nfsservctl
+#define SYS_open __NR_open
+#define SYS_open_by_handle_at __NR_open_by_handle_at
+#define SYS_openat __NR_openat
+#define SYS_pause __NR_pause
+#define SYS_perf_event_open __NR_perf_event_open
+#define SYS_personality __NR_personality
+#define SYS_pipe __NR_pipe
+#define SYS_pipe2 __NR_pipe2
+#define SYS_pivot_root __NR_pivot_root
+#define SYS_poll __NR_poll
+#define SYS_ppoll __NR_ppoll
+#define SYS_prctl __NR_prctl
+#define SYS_pread64 __NR_pread64
+#define SYS_preadv __NR_preadv
+#define SYS_prlimit64 __NR_prlimit64
+#define SYS_process_vm_readv __NR_process_vm_readv
+#define SYS_process_vm_writev __NR_process_vm_writev
+#define SYS_pselect6 __NR_pselect6
+#define SYS_ptrace __NR_ptrace
+#define SYS_putpmsg __NR_putpmsg
+#define SYS_pwrite64 __NR_pwrite64
+#define SYS_pwritev __NR_pwritev
+#define SYS_query_module __NR_query_module
+#define SYS_quotactl __NR_quotactl
+#define SYS_read __NR_read
+#define SYS_readahead __NR_readahead
+#define SYS_readlink __NR_readlink
+#define SYS_readlinkat __NR_readlinkat
+#define SYS_readv __NR_readv
+#define SYS_reboot __NR_reboot
+#define SYS_recvfrom __NR_recvfrom
+#define SYS_recvmmsg __NR_recvmmsg
+#define SYS_recvmsg __NR_recvmsg
+#define SYS_remap_file_pages __NR_remap_file_pages
+#define SYS_removexattr __NR_removexattr
+#define SYS_rename __NR_rename
+#define SYS_renameat __NR_renameat
+#define SYS_request_key __NR_request_key
+#define SYS_restart_syscall __NR_restart_syscall
+#define SYS_rmdir __NR_rmdir
+#define SYS_rt_sigaction __NR_rt_sigaction
+#define SYS_rt_sigpending __NR_rt_sigpending
+#define SYS_rt_sigprocmask __NR_rt_sigprocmask
+#define SYS_rt_sigqueueinfo __NR_rt_sigqueueinfo
+#define SYS_rt_sigreturn __NR_rt_sigreturn
+#define SYS_rt_sigsuspend __NR_rt_sigsuspend
+#define SYS_rt_sigtimedwait __NR_rt_sigtimedwait
+#define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo
+#define SYS_sched_get_priority_max __NR_sched_get_priority_max
+#define SYS_sched_get_priority_min __NR_sched_get_priority_min
+#define SYS_sched_getaffinity __NR_sched_getaffinity
+#define SYS_sched_getparam __NR_sched_getparam
+#define SYS_sched_getscheduler __NR_sched_getscheduler
+#define SYS_sched_rr_get_interval __NR_sched_rr_get_interval
+#define SYS_sched_setaffinity __NR_sched_setaffinity
+#define SYS_sched_setparam __NR_sched_setparam
+#define SYS_sched_setscheduler __NR_sched_setscheduler
+#define SYS_sched_yield __NR_sched_yield
+#define SYS_security __NR_security
+#define SYS_select __NR_select
+#define SYS_semctl __NR_semctl
+#define SYS_semget __NR_semget
+#define SYS_semop __NR_semop
+#define SYS_semtimedop __NR_semtimedop
+#define SYS_sendfile __NR_sendfile
+#define SYS_sendmmsg __NR_sendmmsg
+#define SYS_sendmsg __NR_sendmsg
+#define SYS_sendto __NR_sendto
+#define SYS_set_mempolicy __NR_set_mempolicy
+#define SYS_set_robust_list __NR_set_robust_list
+#define SYS_set_thread_area __NR_set_thread_area
+#define SYS_set_tid_address __NR_set_tid_address
+#define SYS_setdomainname __NR_setdomainname
+#define SYS_setfsgid __NR_setfsgid
+#define SYS_setfsuid __NR_setfsuid
+#define SYS_setgid __NR_setgid
+#define SYS_setgroups __NR_setgroups
+#define SYS_sethostname __NR_sethostname
+#define SYS_setitimer __NR_setitimer
+#define SYS_setns __NR_setns
+#define SYS_setpgid __NR_setpgid
+#define SYS_setpriority __NR_setpriority
+#define SYS_setregid __NR_setregid
+#define SYS_setresgid __NR_setresgid
+#define SYS_setresuid __NR_setresuid
+#define SYS_setreuid __NR_setreuid
+#define SYS_setrlimit __NR_setrlimit
+#define SYS_setsid __NR_setsid
+#define SYS_setsockopt __NR_setsockopt
+#define SYS_settimeofday __NR_settimeofday
+#define SYS_setuid __NR_setuid
+#define SYS_setxattr __NR_setxattr
+#define SYS_shmat __NR_shmat
+#define SYS_shmctl __NR_shmctl
+#define SYS_shmdt __NR_shmdt
+#define SYS_shmget __NR_shmget
+#define SYS_shutdown __NR_shutdown
+#define SYS_sigaltstack __NR_sigaltstack
+#define SYS_signalfd __NR_signalfd
+#define SYS_signalfd4 __NR_signalfd4
+#define SYS_socket __NR_socket
+#define SYS_socketpair __NR_socketpair
+#define SYS_splice __NR_splice
+#define SYS_stat __NR_stat
+#define SYS_statfs __NR_statfs
+#define SYS_swapoff __NR_swapoff
+#define SYS_swapon __NR_swapon
+#define SYS_symlink __NR_symlink
+#define SYS_symlinkat __NR_symlinkat
+#define SYS_sync __NR_sync
+#define SYS_sync_file_range __NR_sync_file_range
+#define SYS_syncfs __NR_syncfs
+#define SYS_sysfs __NR_sysfs
+#define SYS_sysinfo __NR_sysinfo
+#define SYS_syslog __NR_syslog
+#define SYS_tee __NR_tee
+#define SYS_tgkill __NR_tgkill
+#define SYS_time __NR_time
+#define SYS_timer_create __NR_timer_create
+#define SYS_timer_delete __NR_timer_delete
+#define SYS_timer_getoverrun __NR_timer_getoverrun
+#define SYS_timer_gettime __NR_timer_gettime
+#define SYS_timer_settime __NR_timer_settime
+#define SYS_timerfd_create __NR_timerfd_create
+#define SYS_timerfd_gettime __NR_timerfd_gettime
+#define SYS_timerfd_settime __NR_timerfd_settime
+#define SYS_times __NR_times
+#define SYS_tkill __NR_tkill
+#define SYS_truncate __NR_truncate
+#define SYS_tuxcall __NR_tuxcall
+#define SYS_umask __NR_umask
+#define SYS_umount2 __NR_umount2
+#define SYS_uname __NR_uname
+#define SYS_unlink __NR_unlink
+#define SYS_unlinkat __NR_unlinkat
+#define SYS_unshare __NR_unshare
+#define SYS_uselib __NR_uselib
+#define SYS_ustat __NR_ustat
+#define SYS_utime __NR_utime
+#define SYS_utimensat __NR_utimensat
+#define SYS_utimes __NR_utimes
+#define SYS_vfork __NR_vfork
+#define SYS_vhangup __NR_vhangup
+#define SYS_vmsplice __NR_vmsplice
+#define SYS_vserver __NR_vserver
+#define SYS_wait4 __NR_wait4
+#define SYS_waitid __NR_waitid
+#define SYS_write __NR_write
+#define SYS_writev __NR_writev
#endif
#endif /* _BIONIC_GLIBC_SYSCALLS_H_ */
diff --git a/libc/tools/bionic_utils.py b/libc/tools/bionic_utils.py
index eed9001..a00080d 100644
--- a/libc/tools/bionic_utils.py
+++ b/libc/tools/bionic_utils.py
@@ -2,7 +2,7 @@
import sys, os, commands, string
-all_arches = [ "arm", "mips", "x86" ]
+all_arches = [ "arm", "mips", "x86", "x86_64" ]
# basic debugging trace support
# call D_setlevel to set the verbosity level
diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py
index ea60eec..a3c8450 100755
--- a/libc/tools/gensyscalls.py
+++ b/libc/tools/gensyscalls.py
@@ -1,12 +1,10 @@
#!/usr/bin/python
-#
-# this tool is used to generate the syscall assembler templates
-# to be placed into arch-{arm,x86,mips}/syscalls, as well as the content
-# of arch-{arm,x86,mips}/linux/_syscalls.h
-#
+
+# This tool is used to generate the assembler system call stubs,
+# the header files listing all available system calls, and the
+# makefiles used to build all the stubs.
import sys, os.path, glob, re, commands, filecmp, shutil
-import getpass
from bionic_utils import *
@@ -15,7 +13,9 @@
# temp directory where we store all intermediate files
bionic_temp = "/tmp/bionic_gensyscalls/"
-def make_dir( path ):
+DRY_RUN = False
+
+def make_dir(path):
path = os.path.abspath(path)
if not os.path.exists(path):
parent = os.path.dirname(path)
@@ -23,23 +23,25 @@
make_dir(parent)
os.mkdir(path)
-def create_file( relpath ):
- dir = os.path.dirname( bionic_temp + relpath )
+def create_file(relpath):
+ dir = os.path.dirname(bionic_temp + relpath)
make_dir(dir)
- return open( bionic_temp + relpath, "w" )
+ return open(bionic_temp + relpath, "w")
+
+
+syscall_stub_header = """/* autogenerated by gensyscalls.py */
+#include <asm/unistd.h>
+#include <linux/err.h>
+#include <machine/asm.h>
+
+ENTRY(%(fname)s)
+"""
+
#
# x86 assembler templates for each syscall stub
#
-x86_header = """/* autogenerated by gensyscalls.py */
-#include <linux/err.h>
-#include <machine/asm.h>
-#include <asm/unistd.h>
-
-ENTRY(%(fname)s)
-"""
-
x86_registers = [ "%ebx", "%ecx", "%edx", "%esi", "%edi", "%ebp" ]
x86_call = """ movl $%(idname)s, %%eax
@@ -59,18 +61,27 @@
"""
#
+# x86_64 assembler templates for each syscall stub
+#
+
+x86_64_call = """ movl $%(idname)s, %%eax
+ syscall
+ cmpq $-MAX_ERRNO, %%rax
+ jb 1f
+ negl %%eax
+ movl %%eax, %%edi
+ call __set_errno
+ orq $-1, %%rax
+1:
+ ret
+END(%(fname)s)
+"""
+
+#
# ARM assembler templates for each syscall stub
#
-arm_header = """/* autogenerated by gensyscalls.py */
-#include <asm/unistd.h>
-#include <linux/err.h>
-#include <machine/asm.h>
-
-ENTRY(%(fname)s)
-"""
-
-arm_eabi_call_default = arm_header + """\
+arm_eabi_call_default = syscall_stub_header + """\
mov ip, r7
ldr r7, =%(idname)s
swi #0
@@ -82,7 +93,7 @@
END(%(fname)s)
"""
-arm_eabi_call_long = arm_header + """\
+arm_eabi_call_long = syscall_stub_header + """\
mov ip, sp
.save {r4, r5, r6, r7}
stmfd sp!, {r4, r5, r6, r7}
@@ -178,6 +189,12 @@
count += 1
return count
+def count_generic_param_registers64(params):
+ count = 0
+ for param in params:
+ count += 1
+ return count
+
# This lets us support regular system calls like __NR_write and also weird
# ones like __ARM_NR_cacheflush, where the NR doesn't come at the start.
def make__NR_name(name):
@@ -193,11 +210,22 @@
self.other_files = []
self.syscalls = []
+ def x86_64_genstub(self, fname, numparams, idname):
+ t = { "fname" : fname, "idname" : idname }
+
+ result = syscall_stub_header % t
+ # rcx is used as 4th argument. Kernel wants it at r10.
+ if (numparams > 3):
+ result += " movq %rcx, %r10\n"
+
+ result += x86_64_call % t
+ return result
+
def x86_genstub(self, fname, numparams, idname):
t = { "fname" : fname,
"idname" : idname }
- result = x86_header % t
+ result = syscall_stub_header % t
stack_bias = 4
for r in range(numparams):
result += " pushl " + x86_registers[r] + "\n"
@@ -222,7 +250,7 @@
t = { "fname" : fname,
"idname" : idname }
- result = x86_header % t
+ result = syscall_stub_header % t
stack_bias = 4
# save the regs we need
@@ -294,6 +322,9 @@
if t.has_key("mips"):
t["asm-mips"] = self.mips_genstub(syscall_func, make__NR_name(syscall_name))
+ if t.has_key("x86_64"):
+ num_regs = count_generic_param_registers64(syscall_params)
+ t["asm-x86_64"] = self.x86_64_genstub(syscall_func, num_regs, __NR_name)
# Scan a Linux kernel asm/unistd.h file containing __NR_* constants
# and write out equivalent SYS_* constants for glibc source compatibility.
@@ -323,6 +354,8 @@
self.scan_linux_unistd_h(glibc_fp, bionic_libc_root + "/kernel/arch-mips/asm/unistd.h")
glibc_fp.write("#elif defined(__i386__)\n")
self.scan_linux_unistd_h(glibc_fp, bionic_libc_root + "/kernel/arch-x86/asm/unistd_32.h")
+ glibc_fp.write("#elif defined(__x86_64__)\n")
+ self.scan_linux_unistd_h(glibc_fp, bionic_libc_root + "/kernel/arch-x86/asm/unistd_64.h")
glibc_fp.write("#endif\n")
glibc_fp.write("#endif /* _BIONIC_GLIBC_SYSCALLS_H_ */\n")
@@ -358,63 +391,62 @@
def regenerate(self):
- D( "scanning for existing architecture-specific stub files" )
+ D("scanning for existing architecture-specific stub files...")
bionic_libc_root_len = len(bionic_libc_root)
for arch in all_arches:
arch_path = bionic_libc_root + "arch-" + arch
- D( "scanning " + arch_path )
- files = glob.glob( arch_path + "/syscalls/*.S" )
+ D("scanning " + arch_path)
+ files = glob.glob(arch_path + "/syscalls/*.S")
for f in files:
- self.old_stubs.append( f[bionic_libc_root_len:] )
+ self.old_stubs.append(f[bionic_libc_root_len:])
- D( "found %d stub files" % len(self.old_stubs) )
+ D("found %d stub files" % len(self.old_stubs))
- if not os.path.exists( bionic_temp ):
- D( "creating %s" % bionic_temp )
- make_dir( bionic_temp )
+ if not os.path.exists(bionic_temp):
+ D("creating %s..." % bionic_temp)
+ make_dir(bionic_temp)
- D( "re-generating stubs and support files" )
+ D("re-generating stubs and support files...")
self.gen_glibc_syscalls_h()
for arch in all_arches:
self.gen_arch_syscalls_mk(arch)
self.gen_syscall_stubs()
- D( "comparing files" )
+ D("comparing files...")
adds = []
edits = []
for stub in self.new_stubs + self.other_files:
- if not os.path.exists( bionic_libc_root + stub ):
+ if not os.path.exists(bionic_libc_root + stub):
# new file, git add it
- D( "new file: " + stub)
- adds.append( bionic_libc_root + stub )
- shutil.copyfile( bionic_temp + stub, bionic_libc_root + stub )
+ D("new file: " + stub)
+ adds.append(bionic_libc_root + stub)
+ shutil.copyfile(bionic_temp + stub, bionic_libc_root + stub)
- elif not filecmp.cmp( bionic_temp + stub, bionic_libc_root + stub ):
- D( "changed file: " + stub)
- edits.append( stub )
+ elif not filecmp.cmp(bionic_temp + stub, bionic_libc_root + stub):
+ D("changed file: " + stub)
+ edits.append(stub)
deletes = []
for stub in self.old_stubs:
if not stub in self.new_stubs:
- D( "deleted file: " + stub)
- deletes.append( bionic_libc_root + stub )
+ D("deleted file: " + stub)
+ deletes.append(bionic_libc_root + stub)
+ if not DRY_RUN:
+ if adds:
+ commands.getoutput("git add " + " ".join(adds))
+ if deletes:
+ commands.getoutput("git rm " + " ".join(deletes))
+ if edits:
+ for file in edits:
+ shutil.copyfile(bionic_temp + file, bionic_libc_root + file)
+ commands.getoutput("git add " + " ".join((bionic_libc_root + file) for file in edits))
- if adds:
- commands.getoutput("git add " + " ".join(adds))
- if deletes:
- commands.getoutput("git rm " + " ".join(deletes))
- if edits:
- for file in edits:
- shutil.copyfile( bionic_temp + file, bionic_libc_root + file )
- commands.getoutput("git add " +
- " ".join((bionic_libc_root + file) for file in edits))
-
- commands.getoutput("git add %s%s" % (bionic_libc_root,"SYSCALLS.TXT"))
+ commands.getoutput("git add %s%s" % (bionic_libc_root,"SYSCALLS.TXT"))
if (not adds) and (not deletes) and (not edits):
D("no changes detected!")
diff --git a/libdl/Android.mk b/libdl/Android.mk
index e6c6bf4..9d1e1e0 100644
--- a/libdl/Android.mk
+++ b/libdl/Android.mk
@@ -18,7 +18,7 @@
LOCAL_LDFLAGS := -Wl,--exclude-libs=libgcc.a
# for x86, exclude libgcc_eh.a for the same reasons as above
-ifeq ($(TARGET_ARCH),x86)
+ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
LOCAL_LDFLAGS += -Wl,--exclude-libs=libgcc_eh.a
endif