summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Dearman <chris.dearman@imgtec.com>2014-02-05 16:59:23 -0800
committerElliott Hughes <enh@google.com>2014-02-06 15:39:38 -0800
commit5043212b7615bc4c03463c4d242769de69cd4685 (patch)
tree8d1c8921afa032308492c4425a06ae8ab19c5c83
parente163a3986aa7d1c67fe3274eb9204812be0a6245 (diff)
downloadbionic-5043212b7615bc4c03463c4d242769de69cd4685.zip
bionic-5043212b7615bc4c03463c4d242769de69cd4685.tar.gz
bionic-5043212b7615bc4c03463c4d242769de69cd4685.tar.bz2
[MIPS64] Add syscall related files
Change-Id: I2f5d05df0e767538a6fe467ca0a2386325f8b71f Signed-off-by: Chris Dearman <chris.dearman@imgtec.com> Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com> Signed-off-by: Duane Sand <duane.sand@imgtec.com>
-rw-r--r--libc/SYSCALLS.TXT106
-rw-r--r--libc/arch-mips64/syscalls.mk194
-rw-r--r--libc/arch-mips64/syscalls/__brk.S32
-rw-r--r--libc/arch-mips64/syscalls/__epoll_pwait.S32
-rw-r--r--libc/arch-mips64/syscalls/__exit.S32
-rw-r--r--libc/arch-mips64/syscalls/__getcpu.S32
-rw-r--r--libc/arch-mips64/syscalls/__getcwd.S32
-rw-r--r--libc/arch-mips64/syscalls/__getdents.S32
-rw-r--r--libc/arch-mips64/syscalls/__getdents64.S32
-rw-r--r--libc/arch-mips64/syscalls/__getpriority.S32
-rw-r--r--libc/arch-mips64/syscalls/__ioctl.S32
-rw-r--r--libc/arch-mips64/syscalls/__openat.S32
-rw-r--r--libc/arch-mips64/syscalls/__ppoll.S32
-rw-r--r--libc/arch-mips64/syscalls/__pselect6.S32
-rw-r--r--libc/arch-mips64/syscalls/__ptrace.S32
-rw-r--r--libc/arch-mips64/syscalls/__reboot.S32
-rw-r--r--libc/arch-mips64/syscalls/__rt_sigaction.S32
-rw-r--r--libc/arch-mips64/syscalls/__rt_sigpending.S32
-rw-r--r--libc/arch-mips64/syscalls/__rt_sigprocmask.S32
-rw-r--r--libc/arch-mips64/syscalls/__rt_sigsuspend.S32
-rw-r--r--libc/arch-mips64/syscalls/__rt_sigtimedwait.S32
-rw-r--r--libc/arch-mips64/syscalls/__sched_getaffinity.S32
-rw-r--r--libc/arch-mips64/syscalls/__set_thread_area.S32
-rw-r--r--libc/arch-mips64/syscalls/__set_tid_address.S32
-rw-r--r--libc/arch-mips64/syscalls/__syslog.S32
-rw-r--r--libc/arch-mips64/syscalls/__timer_create.S32
-rw-r--r--libc/arch-mips64/syscalls/__timer_delete.S32
-rw-r--r--libc/arch-mips64/syscalls/__timer_getoverrun.S32
-rw-r--r--libc/arch-mips64/syscalls/__timer_gettime.S32
-rw-r--r--libc/arch-mips64/syscalls/__timer_settime.S32
-rw-r--r--libc/arch-mips64/syscalls/__waitid.S32
-rw-r--r--libc/arch-mips64/syscalls/_exit.S31
-rw-r--r--libc/arch-mips64/syscalls/_flush_cache.S31
-rw-r--r--libc/arch-mips64/syscalls/accept.S31
-rw-r--r--libc/arch-mips64/syscalls/acct.S31
-rw-r--r--libc/arch-mips64/syscalls/bind.S31
-rw-r--r--libc/arch-mips64/syscalls/capget.S31
-rw-r--r--libc/arch-mips64/syscalls/capset.S31
-rw-r--r--libc/arch-mips64/syscalls/chdir.S31
-rw-r--r--libc/arch-mips64/syscalls/chroot.S31
-rw-r--r--libc/arch-mips64/syscalls/clock_getres.S31
-rw-r--r--libc/arch-mips64/syscalls/clock_gettime.S31
-rw-r--r--libc/arch-mips64/syscalls/clock_nanosleep.S31
-rw-r--r--libc/arch-mips64/syscalls/clock_settime.S31
-rw-r--r--libc/arch-mips64/syscalls/close.S31
-rw-r--r--libc/arch-mips64/syscalls/connect.S31
-rw-r--r--libc/arch-mips64/syscalls/delete_module.S31
-rw-r--r--libc/arch-mips64/syscalls/dup.S31
-rw-r--r--libc/arch-mips64/syscalls/dup3.S31
-rw-r--r--libc/arch-mips64/syscalls/epoll_create1.S31
-rw-r--r--libc/arch-mips64/syscalls/epoll_ctl.S31
-rw-r--r--libc/arch-mips64/syscalls/eventfd.S31
-rw-r--r--libc/arch-mips64/syscalls/execve.S31
-rw-r--r--libc/arch-mips64/syscalls/faccessat.S31
-rw-r--r--libc/arch-mips64/syscalls/fallocate.S34
-rw-r--r--libc/arch-mips64/syscalls/fchdir.S31
-rw-r--r--libc/arch-mips64/syscalls/fchmod.S31
-rw-r--r--libc/arch-mips64/syscalls/fchmodat.S31
-rw-r--r--libc/arch-mips64/syscalls/fchown.S31
-rw-r--r--libc/arch-mips64/syscalls/fchownat.S31
-rw-r--r--libc/arch-mips64/syscalls/fcntl.S31
-rw-r--r--libc/arch-mips64/syscalls/fdatasync.S31
-rw-r--r--libc/arch-mips64/syscalls/fgetxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/flistxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/flock.S31
-rw-r--r--libc/arch-mips64/syscalls/fremovexattr.S31
-rw-r--r--libc/arch-mips64/syscalls/fsetxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/fstat.S31
-rw-r--r--libc/arch-mips64/syscalls/fstatat.S31
-rw-r--r--libc/arch-mips64/syscalls/fstatfs.S31
-rw-r--r--libc/arch-mips64/syscalls/fsync.S31
-rw-r--r--libc/arch-mips64/syscalls/ftruncate.S34
-rw-r--r--libc/arch-mips64/syscalls/futex.S31
-rw-r--r--libc/arch-mips64/syscalls/getegid.S31
-rw-r--r--libc/arch-mips64/syscalls/geteuid.S31
-rw-r--r--libc/arch-mips64/syscalls/getgid.S31
-rw-r--r--libc/arch-mips64/syscalls/getgroups.S31
-rw-r--r--libc/arch-mips64/syscalls/getitimer.S31
-rw-r--r--libc/arch-mips64/syscalls/getpeername.S31
-rw-r--r--libc/arch-mips64/syscalls/getpgid.S31
-rw-r--r--libc/arch-mips64/syscalls/getpid.S31
-rw-r--r--libc/arch-mips64/syscalls/getppid.S31
-rw-r--r--libc/arch-mips64/syscalls/getresgid.S31
-rw-r--r--libc/arch-mips64/syscalls/getresuid.S31
-rw-r--r--libc/arch-mips64/syscalls/getrlimit.S34
-rw-r--r--libc/arch-mips64/syscalls/getrusage.S31
-rw-r--r--libc/arch-mips64/syscalls/getsid.S31
-rw-r--r--libc/arch-mips64/syscalls/getsockname.S31
-rw-r--r--libc/arch-mips64/syscalls/getsockopt.S31
-rw-r--r--libc/arch-mips64/syscalls/gettid.S31
-rw-r--r--libc/arch-mips64/syscalls/gettimeofday.S31
-rw-r--r--libc/arch-mips64/syscalls/getuid.S31
-rw-r--r--libc/arch-mips64/syscalls/getxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/init_module.S31
-rw-r--r--libc/arch-mips64/syscalls/inotify_add_watch.S31
-rw-r--r--libc/arch-mips64/syscalls/inotify_init1.S31
-rw-r--r--libc/arch-mips64/syscalls/inotify_rm_watch.S31
-rw-r--r--libc/arch-mips64/syscalls/ioprio_get.S31
-rw-r--r--libc/arch-mips64/syscalls/ioprio_set.S31
-rw-r--r--libc/arch-mips64/syscalls/kill.S31
-rw-r--r--libc/arch-mips64/syscalls/klogctl.S31
-rw-r--r--libc/arch-mips64/syscalls/lgetxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/linkat.S31
-rw-r--r--libc/arch-mips64/syscalls/listen.S31
-rw-r--r--libc/arch-mips64/syscalls/listxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/llistxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/lremovexattr.S31
-rw-r--r--libc/arch-mips64/syscalls/lseek.S34
-rw-r--r--libc/arch-mips64/syscalls/lsetxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/madvise.S31
-rw-r--r--libc/arch-mips64/syscalls/mincore.S31
-rw-r--r--libc/arch-mips64/syscalls/mkdirat.S31
-rw-r--r--libc/arch-mips64/syscalls/mknodat.S31
-rw-r--r--libc/arch-mips64/syscalls/mlock.S31
-rw-r--r--libc/arch-mips64/syscalls/mlockall.S31
-rw-r--r--libc/arch-mips64/syscalls/mmap.S34
-rw-r--r--libc/arch-mips64/syscalls/mount.S31
-rw-r--r--libc/arch-mips64/syscalls/mprotect.S31
-rw-r--r--libc/arch-mips64/syscalls/mremap.S31
-rw-r--r--libc/arch-mips64/syscalls/msync.S31
-rw-r--r--libc/arch-mips64/syscalls/munlock.S31
-rw-r--r--libc/arch-mips64/syscalls/munlockall.S31
-rw-r--r--libc/arch-mips64/syscalls/munmap.S31
-rw-r--r--libc/arch-mips64/syscalls/nanosleep.S31
-rw-r--r--libc/arch-mips64/syscalls/perf_event_open.S31
-rw-r--r--libc/arch-mips64/syscalls/personality.S31
-rw-r--r--libc/arch-mips64/syscalls/pipe2.S31
-rw-r--r--libc/arch-mips64/syscalls/prctl.S31
-rw-r--r--libc/arch-mips64/syscalls/pread64.S34
-rw-r--r--libc/arch-mips64/syscalls/prlimit64.S34
-rw-r--r--libc/arch-mips64/syscalls/pwrite64.S34
-rw-r--r--libc/arch-mips64/syscalls/read.S31
-rw-r--r--libc/arch-mips64/syscalls/readahead.S31
-rw-r--r--libc/arch-mips64/syscalls/readlinkat.S31
-rw-r--r--libc/arch-mips64/syscalls/readv.S31
-rw-r--r--libc/arch-mips64/syscalls/recvfrom.S31
-rw-r--r--libc/arch-mips64/syscalls/recvmsg.S31
-rw-r--r--libc/arch-mips64/syscalls/removexattr.S31
-rw-r--r--libc/arch-mips64/syscalls/renameat.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_get_priority_max.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_get_priority_min.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_getparam.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_getscheduler.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_rr_get_interval.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_setaffinity.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_setparam.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_setscheduler.S31
-rw-r--r--libc/arch-mips64/syscalls/sched_yield.S31
-rw-r--r--libc/arch-mips64/syscalls/sendfile.S34
-rw-r--r--libc/arch-mips64/syscalls/sendmsg.S31
-rw-r--r--libc/arch-mips64/syscalls/sendto.S31
-rw-r--r--libc/arch-mips64/syscalls/setgid.S31
-rw-r--r--libc/arch-mips64/syscalls/setgroups.S31
-rw-r--r--libc/arch-mips64/syscalls/setitimer.S31
-rw-r--r--libc/arch-mips64/syscalls/setns.S31
-rw-r--r--libc/arch-mips64/syscalls/setpgid.S31
-rw-r--r--libc/arch-mips64/syscalls/setpriority.S31
-rw-r--r--libc/arch-mips64/syscalls/setregid.S31
-rw-r--r--libc/arch-mips64/syscalls/setresgid.S31
-rw-r--r--libc/arch-mips64/syscalls/setresuid.S31
-rw-r--r--libc/arch-mips64/syscalls/setreuid.S31
-rw-r--r--libc/arch-mips64/syscalls/setrlimit.S34
-rw-r--r--libc/arch-mips64/syscalls/setsid.S31
-rw-r--r--libc/arch-mips64/syscalls/setsockopt.S31
-rw-r--r--libc/arch-mips64/syscalls/settimeofday.S31
-rw-r--r--libc/arch-mips64/syscalls/setuid.S31
-rw-r--r--libc/arch-mips64/syscalls/setxattr.S31
-rw-r--r--libc/arch-mips64/syscalls/shutdown.S31
-rw-r--r--libc/arch-mips64/syscalls/sigaltstack.S31
-rw-r--r--libc/arch-mips64/syscalls/signalfd4.S31
-rw-r--r--libc/arch-mips64/syscalls/socket.S31
-rw-r--r--libc/arch-mips64/syscalls/socketpair.S31
-rw-r--r--libc/arch-mips64/syscalls/statfs.S31
-rw-r--r--libc/arch-mips64/syscalls/swapoff.S31
-rw-r--r--libc/arch-mips64/syscalls/swapon.S31
-rw-r--r--libc/arch-mips64/syscalls/symlinkat.S31
-rw-r--r--libc/arch-mips64/syscalls/sync.S31
-rw-r--r--libc/arch-mips64/syscalls/sysinfo.S31
-rw-r--r--libc/arch-mips64/syscalls/tgkill.S31
-rw-r--r--libc/arch-mips64/syscalls/timerfd_create.S31
-rw-r--r--libc/arch-mips64/syscalls/timerfd_gettime.S31
-rw-r--r--libc/arch-mips64/syscalls/timerfd_settime.S31
-rw-r--r--libc/arch-mips64/syscalls/times.S31
-rw-r--r--libc/arch-mips64/syscalls/tkill.S31
-rw-r--r--libc/arch-mips64/syscalls/truncate.S34
-rw-r--r--libc/arch-mips64/syscalls/umask.S31
-rw-r--r--libc/arch-mips64/syscalls/umount2.S31
-rw-r--r--libc/arch-mips64/syscalls/uname.S31
-rw-r--r--libc/arch-mips64/syscalls/unlinkat.S31
-rw-r--r--libc/arch-mips64/syscalls/unshare.S31
-rw-r--r--libc/arch-mips64/syscalls/utimensat.S31
-rw-r--r--libc/arch-mips64/syscalls/wait4.S31
-rw-r--r--libc/arch-mips64/syscalls/write.S31
-rw-r--r--libc/arch-mips64/syscalls/writev.S31
-rw-r--r--libc/tools/bionic_utils.py2
-rwxr-xr-xlibc/tools/gensyscalls.py45
196 files changed, 6310 insertions, 51 deletions
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 0555983..e60b166 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -6,7 +6,7 @@
#
# where:
# arch_list ::= "all" | arch+
-# arch ::= "arm" | "arm64" | "mips" | "x86" | "x86_64"
+# arch ::= "arm" | "arm64" | "mips" | "mips64" | "x86" | "x86_64"
#
# Note:
# - syscall_name corresponds to the name of the syscall, which may differ from
@@ -27,41 +27,41 @@
int execve(const char*, char* const*, char* const*) all
uid_t getuid:getuid32() arm,x86
-uid_t getuid:getuid() arm64,mips,x86_64
+uid_t getuid:getuid() arm64,mips,mips64,x86_64
gid_t getgid:getgid32() arm,x86
-gid_t getgid:getgid() arm64,mips,x86_64
+gid_t getgid:getgid() arm64,mips,mips64,x86_64
uid_t geteuid:geteuid32() arm,x86
-uid_t geteuid:geteuid() arm64,mips,x86_64
+uid_t geteuid:geteuid() arm64,mips,mips64,x86_64
gid_t getegid:getegid32() arm,x86
-gid_t getegid:getegid() arm64,mips,x86_64
+gid_t getegid:getegid() arm64,mips,mips64,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) arm64,mips,x86_64
+uid_t getresuid:getresuid(uid_t* ruid, uid_t* euid, uid_t* suid) arm64,mips,mips64,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) arm64,mips,x86_64
+gid_t getresgid:getresgid(gid_t* rgid, gid_t* egid, gid_t* sgid) arm64,mips,mips64,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*) arm64,mips,x86_64
+int getgroups:getgroups(int, gid_t*) arm64,mips,mips64,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) arm64,mips,x86_64
+int setgid:setgid(gid_t) arm64,mips,mips64,x86_64
int setuid:setuid32(uid_t) arm,x86
-int setuid:setuid(uid_t) arm64,mips,x86_64
+int setuid:setuid(uid_t) arm64,mips,mips64,x86_64
int setreuid:setreuid32(uid_t, uid_t) arm,x86
-int setreuid:setreuid(uid_t, uid_t) arm64,mips,x86_64
+int setreuid:setreuid(uid_t, uid_t) arm64,mips,mips64,x86_64
int setresuid:setresuid32(uid_t, uid_t, uid_t) arm,x86
-int setresuid:setresuid(uid_t, uid_t, uid_t) arm64,mips,x86_64
+int setresuid:setresuid(uid_t, uid_t, uid_t) arm64,mips,mips64,x86_64
int setresgid:setresgid32(gid_t, gid_t, gid_t) arm,x86
-int setresgid:setresgid(gid_t, gid_t, gid_t) arm64,mips,x86_64
+int setresgid:setresgid(gid_t, gid_t, gid_t) arm64,mips,mips64,x86_64
void* __brk:brk(void*) all
int kill(pid_t, int) all
int tkill(pid_t tid, int sig) all
int tgkill(pid_t tgid, pid_t tid, int sig) all
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 __set_thread_area:set_thread_area(void* user_desc) mips,mips64,x86
# <sys/resource.h>
int getrusage(int, struct rusage*) all
@@ -71,18 +71,18 @@ int setpriority(int, int, int) all
# On 32-bit systems we use prlimit64 to implement the rlimit64 functions.
int getrlimit:ugetrlimit(int, struct rlimit*) arm,x86
int getrlimit(int, struct rlimit*) mips
-int getrlimit|getrlimit64(int, struct rlimit*) arm64,x86_64
+int getrlimit|getrlimit64(int, struct rlimit*) arm64,mips64,x86_64
int setrlimit(int, const struct rlimit*) arm,mips,x86
-int setrlimit|setrlimit64(int, const struct rlimit*) arm64,x86_64
-int prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) arm64,x86_64
+int setrlimit|setrlimit64(int, const struct rlimit*) arm64,mips64,x86_64
+int prlimit64|prlimit(pid_t, int, struct rlimit64*, const struct rlimit64*) arm64,mips64,x86_64
int prlimit64(pid_t, int, struct rlimit64*, const struct rlimit64*) arm,mips,x86
int setgroups:setgroups32(int, const gid_t*) arm,x86
-int setgroups:setgroups(int, const gid_t*) arm64,mips,x86_64
+int setgroups:setgroups(int, const gid_t*) arm64,mips,mips64,x86_64
int setpgid(pid_t, pid_t) all
pid_t vfork(void) arm
int setregid:setregid32(gid_t, gid_t) arm,x86
-int setregid:setregid(gid_t, gid_t) arm64,mips,x86_64
+int setregid:setregid(gid_t, gid_t) arm64,mips,mips64,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.
@@ -97,9 +97,9 @@ int acct(const char* filepath) all
ssize_t read(int, void*, size_t) all
ssize_t write(int, const void*, size_t) all
ssize_t pread64(int, void*, size_t, off64_t) arm,mips,x86
-ssize_t pread64|pread(int, void*, size_t, off_t) arm64,x86_64
+ssize_t pread64|pread(int, void*, size_t, off_t) arm64,mips64,x86_64
ssize_t pwrite64(int, void*, size_t, off64_t) arm,mips,x86
-ssize_t pwrite64|pwrite(int, void*, size_t, off_t) arm64,x86_64
+ssize_t pwrite64|pwrite(int, void*, size_t, off_t) arm64,mips64,x86_64
int close(int) all
pid_t getpid() all
int munmap(void*, size_t) all
@@ -116,31 +116,37 @@ int __ioctl:ioctl(int, int, void*) all
int readv(int, const struct iovec*, int) all
int writev(int, const struct iovec*, int) all
int __fcntl64:fcntl64(int, int, void*) arm,mips,x86
-int fcntl(int, int, void*) arm64,x86_64
+int fcntl(int, int, void*) arm64,mips64,x86_64
int flock(int, int) all
int fchmod(int, mode_t) all
int dup(int) all
int pipe2(int*, int) all
int dup3(int, int, int) all
-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) arm64,mips,x86_64
+int fchown:fchown(int, uid_t, gid_t) arm64,mips,mips64,x86_64
void sync(void) all
int __fstatfs64:fstatfs64(int, size_t, struct statfs*) arm,mips,x86
-int fstatfs(int, struct statfs*) arm64,x86_64
+int fstatfs(int, struct statfs*) arm64,mips64,x86_64
int fsetxattr(int, const char*, const void*, size_t, int) all
ssize_t fgetxattr(int, const char*, void*, size_t) all
ssize_t flistxattr(int, char*, size_t) all
int fremovexattr(int, const char*) all
+# mips64 doesn't have getdents64 until 3.10 kernels.
+# We need this special-case hack as long as we need to support mips64 on older kernels.
+# The currently-available Debian qemu image is on a 3.2 kernel.
+int getdents:getdents64(unsigned int, struct dirent*, unsigned int) arm,arm64,mips,x86,x86_64
+int __getdents64:getdents64(unsigned int, struct dirent*, unsigned int) mips64
+int __getdents:getdents(unsigned int, void*, unsigned int) mips64
+
int __openat:openat(int, const char*, int, mode_t) all
int faccessat(int, const char*, int, int) all
int fchmodat(int, const char*, mode_t, int) all
int fchownat(int, const char*, uid_t, gid_t, int) all
int fstatat:fstatat64(int, const char*, struct stat*, int) arm,mips,x86
-int fstatat:newfstatat(int, const char*, struct stat*, int) arm64,x86_64
+int fstatat:newfstatat(int, const char*, struct stat*, int) arm64,mips64,x86_64
int linkat(int, const char*, int, const char*, int) all
int mkdirat(int, const char*, mode_t) all
int mknodat(int, const char*, mode_t, dev_t) all
@@ -156,29 +162,29 @@ int utimensat(int, const char*, const struct timespec times[2], int) all
# That means that every system call in this section should take three lines.
off_t lseek(int, off_t, int) arm,mips,x86
int __llseek:_llseek(int, unsigned long, unsigned long, off64_t*, int) arm,mips,x86
-off_t lseek|lseek64(int, off_t, int) arm64,x86_64
+off_t lseek|lseek64(int, off_t, int) arm64,mips64,x86_64
int ftruncate(int, off_t) arm,mips,x86
int ftruncate64(int, off64_t) arm,mips,x86
-int ftruncate|ftruncate64(int, off_t) arm64,x86_64
+int ftruncate|ftruncate64(int, off_t) arm64,mips64,x86_64
ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) arm,mips,x86
ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) arm,mips,x86
-ssize_t sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) arm64,x86_64
+ssize_t sendfile|sendfile64(int out_fd, int in_fd, off_t* offset, size_t count) arm64,mips64,x86_64
int truncate(const char*, off_t) arm,mips,x86
int truncate64(const char*, off64_t) arm,mips,x86
-int truncate|truncate64(const char*, off_t) arm64,x86_64
+int truncate|truncate64(const char*, off_t) arm64,mips64,x86_64
# (mmap only gets two lines because we only used the 64-bit variant on 32-bit systems.)
void* __mmap2:mmap2(void*, size_t, int, int, int, long) arm,mips,x86
-void* mmap|mmap64(void*, size_t, int, int, int, off_t) arm64,x86_64
+void* mmap|mmap64(void*, size_t, int, int, int, off_t) arm64,mips64,x86_64
# (fallocate only gets two lines because there is no 32-bit variant.)
int fallocate64:fallocate(int, int, off64_t, off64_t) arm,mips,x86
-int fallocate|fallocate64(int, int, off_t, off_t) arm64,x86_64
+int fallocate|fallocate64(int, int, off_t, off_t) arm64,mips64,x86_64
# file system
int chdir(const char*) all
int mount(const char*, const char*, const char*, unsigned long, const void*) all
int umount2(const char*, int) all
int fstat:fstat64(int, struct stat*) arm,mips,x86
-int fstat(int, struct stat*) arm64,x86_64
+int fstat(int, struct stat*) arm64,mips64,x86_64
int __getcwd:getcwd(char* buf, size_t size) all
int fchdir(int) all
int setxattr(const char*, const char*, const void*, size_t, int) all
@@ -190,7 +196,7 @@ 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*) arm,mips,x86
-int statfs(const char*, struct statfs*) arm64,x86_64
+int statfs(const char*, struct statfs*) arm64,mips64,x86_64
int swapon(const char*, int) all
int swapoff(const char*) all
@@ -224,21 +230,21 @@ int __rt_sigtimedwait:rt_sigtimedwait(const sigset_t*, struct siginfo_t*, st
int signalfd4(int, const sigset_t*, size_t, int) all
# sockets
-int socket(int, int, int) arm,arm64,mips,x86_64
-int socketpair(int, int, int, int*) arm,arm64,mips,x86_64
-int bind(int, struct sockaddr*, int) arm,arm64,mips,x86_64
-int connect(int, struct sockaddr*, socklen_t) arm,arm64,mips,x86_64
-int listen(int, int) arm,arm64,mips,x86_64
-int accept(int, struct sockaddr*, socklen_t*) arm,arm64,mips,x86_64
-int getsockname(int, struct sockaddr*, socklen_t*) arm,arm64,mips,x86_64
-int getpeername(int, struct sockaddr*, socklen_t*) arm,arm64,mips,x86_64
-int sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,arm64,mips,x86_64
-int recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,arm64,mips,x86_64
-int shutdown(int, int) arm,arm64,mips,x86_64
-int setsockopt(int, int, int, const void*, socklen_t) arm,arm64,mips,x86_64
-int getsockopt(int, int, int, void*, socklen_t*) arm,arm64,mips,x86_64
-int sendmsg(int, const struct msghdr*, unsigned int) arm,arm64,mips,x86_64
-int recvmsg(int, struct msghdr*, unsigned int) arm,arm64,mips,x86_64
+int socket(int, int, int) arm,arm64,mips,mips64,x86_64
+int socketpair(int, int, int, int*) arm,arm64,mips,mips64,x86_64
+int bind(int, struct sockaddr*, int) arm,arm64,mips,mips64,x86_64
+int connect(int, struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64
+int listen(int, int) arm,arm64,mips,mips64,x86_64
+int accept(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
+int getsockname(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
+int getpeername(int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
+int sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t) arm,arm64,mips,mips64,x86_64
+int recvfrom(int, void*, size_t, unsigned int, struct sockaddr*, socklen_t*) arm,arm64,mips,mips64,x86_64
+int shutdown(int, int) arm,arm64,mips,mips64,x86_64
+int setsockopt(int, int, int, const void*, socklen_t) arm,arm64,mips,mips64,x86_64
+int getsockopt(int, int, int, void*, socklen_t*) arm,arm64,mips,mips64,x86_64
+int sendmsg(int, const struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64
+int recvmsg(int, struct msghdr*, unsigned int) arm,arm64,mips,mips64,x86_64
# sockets for x86. These are done as an "indexed" call to socketcall syscall.
int socket:socketcall:1(int, int, int) x86
@@ -316,4 +322,4 @@ int __set_tls:__ARM_NR_set_tls(void*) arm
int cacheflush:__ARM_NR_cacheflush(long start, long end, long flags) arm
# MIPS-specific
-int _flush_cache:cacheflush(char* addr, const int nbytes, const int op) mips
+int _flush_cache:cacheflush(char* addr, const int nbytes, const int op) mips,mips64
diff --git a/libc/arch-mips64/syscalls.mk b/libc/arch-mips64/syscalls.mk
new file mode 100644
index 0000000..5d8029e
--- /dev/null
+++ b/libc/arch-mips64/syscalls.mk
@@ -0,0 +1,194 @@
+# Generated by gensyscalls.py. Do not edit.
+syscall_src :=
+syscall_src += arch-mips64/syscalls/__brk.S
+syscall_src += arch-mips64/syscalls/__epoll_pwait.S
+syscall_src += arch-mips64/syscalls/__exit.S
+syscall_src += arch-mips64/syscalls/__getcpu.S
+syscall_src += arch-mips64/syscalls/__getcwd.S
+syscall_src += arch-mips64/syscalls/__getdents.S
+syscall_src += arch-mips64/syscalls/__getdents64.S
+syscall_src += arch-mips64/syscalls/__getpriority.S
+syscall_src += arch-mips64/syscalls/__ioctl.S
+syscall_src += arch-mips64/syscalls/__openat.S
+syscall_src += arch-mips64/syscalls/__ppoll.S
+syscall_src += arch-mips64/syscalls/__pselect6.S
+syscall_src += arch-mips64/syscalls/__ptrace.S
+syscall_src += arch-mips64/syscalls/__reboot.S
+syscall_src += arch-mips64/syscalls/__rt_sigaction.S
+syscall_src += arch-mips64/syscalls/__rt_sigpending.S
+syscall_src += arch-mips64/syscalls/__rt_sigprocmask.S
+syscall_src += arch-mips64/syscalls/__rt_sigsuspend.S
+syscall_src += arch-mips64/syscalls/__rt_sigtimedwait.S
+syscall_src += arch-mips64/syscalls/__sched_getaffinity.S
+syscall_src += arch-mips64/syscalls/__set_thread_area.S
+syscall_src += arch-mips64/syscalls/__set_tid_address.S
+syscall_src += arch-mips64/syscalls/__syslog.S
+syscall_src += arch-mips64/syscalls/__timer_create.S
+syscall_src += arch-mips64/syscalls/__timer_delete.S
+syscall_src += arch-mips64/syscalls/__timer_getoverrun.S
+syscall_src += arch-mips64/syscalls/__timer_gettime.S
+syscall_src += arch-mips64/syscalls/__timer_settime.S
+syscall_src += arch-mips64/syscalls/__waitid.S
+syscall_src += arch-mips64/syscalls/_exit.S
+syscall_src += arch-mips64/syscalls/_flush_cache.S
+syscall_src += arch-mips64/syscalls/accept.S
+syscall_src += arch-mips64/syscalls/acct.S
+syscall_src += arch-mips64/syscalls/bind.S
+syscall_src += arch-mips64/syscalls/capget.S
+syscall_src += arch-mips64/syscalls/capset.S
+syscall_src += arch-mips64/syscalls/chdir.S
+syscall_src += arch-mips64/syscalls/chroot.S
+syscall_src += arch-mips64/syscalls/clock_getres.S
+syscall_src += arch-mips64/syscalls/clock_gettime.S
+syscall_src += arch-mips64/syscalls/clock_nanosleep.S
+syscall_src += arch-mips64/syscalls/clock_settime.S
+syscall_src += arch-mips64/syscalls/close.S
+syscall_src += arch-mips64/syscalls/connect.S
+syscall_src += arch-mips64/syscalls/delete_module.S
+syscall_src += arch-mips64/syscalls/dup.S
+syscall_src += arch-mips64/syscalls/dup3.S
+syscall_src += arch-mips64/syscalls/epoll_create1.S
+syscall_src += arch-mips64/syscalls/epoll_ctl.S
+syscall_src += arch-mips64/syscalls/eventfd.S
+syscall_src += arch-mips64/syscalls/execve.S
+syscall_src += arch-mips64/syscalls/faccessat.S
+syscall_src += arch-mips64/syscalls/fallocate.S
+syscall_src += arch-mips64/syscalls/fchdir.S
+syscall_src += arch-mips64/syscalls/fchmod.S
+syscall_src += arch-mips64/syscalls/fchmodat.S
+syscall_src += arch-mips64/syscalls/fchown.S
+syscall_src += arch-mips64/syscalls/fchownat.S
+syscall_src += arch-mips64/syscalls/fcntl.S
+syscall_src += arch-mips64/syscalls/fdatasync.S
+syscall_src += arch-mips64/syscalls/fgetxattr.S
+syscall_src += arch-mips64/syscalls/flistxattr.S
+syscall_src += arch-mips64/syscalls/flock.S
+syscall_src += arch-mips64/syscalls/fremovexattr.S
+syscall_src += arch-mips64/syscalls/fsetxattr.S
+syscall_src += arch-mips64/syscalls/fstat.S
+syscall_src += arch-mips64/syscalls/fstatat.S
+syscall_src += arch-mips64/syscalls/fstatfs.S
+syscall_src += arch-mips64/syscalls/fsync.S
+syscall_src += arch-mips64/syscalls/ftruncate.S
+syscall_src += arch-mips64/syscalls/futex.S
+syscall_src += arch-mips64/syscalls/getegid.S
+syscall_src += arch-mips64/syscalls/geteuid.S
+syscall_src += arch-mips64/syscalls/getgid.S
+syscall_src += arch-mips64/syscalls/getgroups.S
+syscall_src += arch-mips64/syscalls/getitimer.S
+syscall_src += arch-mips64/syscalls/getpeername.S
+syscall_src += arch-mips64/syscalls/getpgid.S
+syscall_src += arch-mips64/syscalls/getpid.S
+syscall_src += arch-mips64/syscalls/getppid.S
+syscall_src += arch-mips64/syscalls/getresgid.S
+syscall_src += arch-mips64/syscalls/getresuid.S
+syscall_src += arch-mips64/syscalls/getrlimit.S
+syscall_src += arch-mips64/syscalls/getrusage.S
+syscall_src += arch-mips64/syscalls/getsid.S
+syscall_src += arch-mips64/syscalls/getsockname.S
+syscall_src += arch-mips64/syscalls/getsockopt.S
+syscall_src += arch-mips64/syscalls/gettid.S
+syscall_src += arch-mips64/syscalls/gettimeofday.S
+syscall_src += arch-mips64/syscalls/getuid.S
+syscall_src += arch-mips64/syscalls/getxattr.S
+syscall_src += arch-mips64/syscalls/init_module.S
+syscall_src += arch-mips64/syscalls/inotify_add_watch.S
+syscall_src += arch-mips64/syscalls/inotify_init1.S
+syscall_src += arch-mips64/syscalls/inotify_rm_watch.S
+syscall_src += arch-mips64/syscalls/ioprio_get.S
+syscall_src += arch-mips64/syscalls/ioprio_set.S
+syscall_src += arch-mips64/syscalls/kill.S
+syscall_src += arch-mips64/syscalls/klogctl.S
+syscall_src += arch-mips64/syscalls/lgetxattr.S
+syscall_src += arch-mips64/syscalls/linkat.S
+syscall_src += arch-mips64/syscalls/listen.S
+syscall_src += arch-mips64/syscalls/listxattr.S
+syscall_src += arch-mips64/syscalls/llistxattr.S
+syscall_src += arch-mips64/syscalls/lremovexattr.S
+syscall_src += arch-mips64/syscalls/lseek.S
+syscall_src += arch-mips64/syscalls/lsetxattr.S
+syscall_src += arch-mips64/syscalls/madvise.S
+syscall_src += arch-mips64/syscalls/mincore.S
+syscall_src += arch-mips64/syscalls/mkdirat.S
+syscall_src += arch-mips64/syscalls/mknodat.S
+syscall_src += arch-mips64/syscalls/mlock.S
+syscall_src += arch-mips64/syscalls/mlockall.S
+syscall_src += arch-mips64/syscalls/mmap.S
+syscall_src += arch-mips64/syscalls/mount.S
+syscall_src += arch-mips64/syscalls/mprotect.S
+syscall_src += arch-mips64/syscalls/mremap.S
+syscall_src += arch-mips64/syscalls/msync.S
+syscall_src += arch-mips64/syscalls/munlock.S
+syscall_src += arch-mips64/syscalls/munlockall.S
+syscall_src += arch-mips64/syscalls/munmap.S
+syscall_src += arch-mips64/syscalls/nanosleep.S
+syscall_src += arch-mips64/syscalls/perf_event_open.S
+syscall_src += arch-mips64/syscalls/personality.S
+syscall_src += arch-mips64/syscalls/pipe2.S
+syscall_src += arch-mips64/syscalls/prctl.S
+syscall_src += arch-mips64/syscalls/pread64.S
+syscall_src += arch-mips64/syscalls/prlimit64.S
+syscall_src += arch-mips64/syscalls/pwrite64.S
+syscall_src += arch-mips64/syscalls/read.S
+syscall_src += arch-mips64/syscalls/readahead.S
+syscall_src += arch-mips64/syscalls/readlinkat.S
+syscall_src += arch-mips64/syscalls/readv.S
+syscall_src += arch-mips64/syscalls/recvfrom.S
+syscall_src += arch-mips64/syscalls/recvmsg.S
+syscall_src += arch-mips64/syscalls/removexattr.S
+syscall_src += arch-mips64/syscalls/renameat.S
+syscall_src += arch-mips64/syscalls/sched_get_priority_max.S
+syscall_src += arch-mips64/syscalls/sched_get_priority_min.S
+syscall_src += arch-mips64/syscalls/sched_getparam.S
+syscall_src += arch-mips64/syscalls/sched_getscheduler.S
+syscall_src += arch-mips64/syscalls/sched_rr_get_interval.S
+syscall_src += arch-mips64/syscalls/sched_setaffinity.S
+syscall_src += arch-mips64/syscalls/sched_setparam.S
+syscall_src += arch-mips64/syscalls/sched_setscheduler.S
+syscall_src += arch-mips64/syscalls/sched_yield.S
+syscall_src += arch-mips64/syscalls/sendfile.S
+syscall_src += arch-mips64/syscalls/sendmsg.S
+syscall_src += arch-mips64/syscalls/sendto.S
+syscall_src += arch-mips64/syscalls/setgid.S
+syscall_src += arch-mips64/syscalls/setgroups.S
+syscall_src += arch-mips64/syscalls/setitimer.S
+syscall_src += arch-mips64/syscalls/setns.S
+syscall_src += arch-mips64/syscalls/setpgid.S
+syscall_src += arch-mips64/syscalls/setpriority.S
+syscall_src += arch-mips64/syscalls/setregid.S
+syscall_src += arch-mips64/syscalls/setresgid.S
+syscall_src += arch-mips64/syscalls/setresuid.S
+syscall_src += arch-mips64/syscalls/setreuid.S
+syscall_src += arch-mips64/syscalls/setrlimit.S
+syscall_src += arch-mips64/syscalls/setsid.S
+syscall_src += arch-mips64/syscalls/setsockopt.S
+syscall_src += arch-mips64/syscalls/settimeofday.S
+syscall_src += arch-mips64/syscalls/setuid.S
+syscall_src += arch-mips64/syscalls/setxattr.S
+syscall_src += arch-mips64/syscalls/shutdown.S
+syscall_src += arch-mips64/syscalls/sigaltstack.S
+syscall_src += arch-mips64/syscalls/signalfd4.S
+syscall_src += arch-mips64/syscalls/socket.S
+syscall_src += arch-mips64/syscalls/socketpair.S
+syscall_src += arch-mips64/syscalls/statfs.S
+syscall_src += arch-mips64/syscalls/swapoff.S
+syscall_src += arch-mips64/syscalls/swapon.S
+syscall_src += arch-mips64/syscalls/symlinkat.S
+syscall_src += arch-mips64/syscalls/sync.S
+syscall_src += arch-mips64/syscalls/sysinfo.S
+syscall_src += arch-mips64/syscalls/tgkill.S
+syscall_src += arch-mips64/syscalls/timerfd_create.S
+syscall_src += arch-mips64/syscalls/timerfd_gettime.S
+syscall_src += arch-mips64/syscalls/timerfd_settime.S
+syscall_src += arch-mips64/syscalls/times.S
+syscall_src += arch-mips64/syscalls/tkill.S
+syscall_src += arch-mips64/syscalls/truncate.S
+syscall_src += arch-mips64/syscalls/umask.S
+syscall_src += arch-mips64/syscalls/umount2.S
+syscall_src += arch-mips64/syscalls/uname.S
+syscall_src += arch-mips64/syscalls/unlinkat.S
+syscall_src += arch-mips64/syscalls/unshare.S
+syscall_src += arch-mips64/syscalls/utimensat.S
+syscall_src += arch-mips64/syscalls/wait4.S
+syscall_src += arch-mips64/syscalls/write.S
+syscall_src += arch-mips64/syscalls/writev.S
diff --git a/libc/arch-mips64/syscalls/__brk.S b/libc/arch-mips64/syscalls/__brk.S
new file mode 100644
index 0000000..1e3939a
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__brk.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __brk
+ .align 4
+ .ent __brk
+
+__brk:
+ .set push
+ .set noreorder
+ li v0, __NR_brk
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __brk
+.hidden _C_LABEL(__brk)
diff --git a/libc/arch-mips64/syscalls/__epoll_pwait.S b/libc/arch-mips64/syscalls/__epoll_pwait.S
new file mode 100644
index 0000000..6167f48
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__epoll_pwait.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __epoll_pwait
+ .align 4
+ .ent __epoll_pwait
+
+__epoll_pwait:
+ .set push
+ .set noreorder
+ li v0, __NR_epoll_pwait
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __epoll_pwait
+.hidden _C_LABEL(__epoll_pwait)
diff --git a/libc/arch-mips64/syscalls/__exit.S b/libc/arch-mips64/syscalls/__exit.S
new file mode 100644
index 0000000..0297a68
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__exit.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __exit
+ .align 4
+ .ent __exit
+
+__exit:
+ .set push
+ .set noreorder
+ li v0, __NR_exit
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __exit
+.hidden _C_LABEL(__exit)
diff --git a/libc/arch-mips64/syscalls/__getcpu.S b/libc/arch-mips64/syscalls/__getcpu.S
new file mode 100644
index 0000000..d20369e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__getcpu.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __getcpu
+ .align 4
+ .ent __getcpu
+
+__getcpu:
+ .set push
+ .set noreorder
+ li v0, __NR_getcpu
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __getcpu
+.hidden _C_LABEL(__getcpu)
diff --git a/libc/arch-mips64/syscalls/__getcwd.S b/libc/arch-mips64/syscalls/__getcwd.S
new file mode 100644
index 0000000..47a32df
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__getcwd.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __getcwd
+ .align 4
+ .ent __getcwd
+
+__getcwd:
+ .set push
+ .set noreorder
+ li v0, __NR_getcwd
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __getcwd
+.hidden _C_LABEL(__getcwd)
diff --git a/libc/arch-mips64/syscalls/__getdents.S b/libc/arch-mips64/syscalls/__getdents.S
new file mode 100644
index 0000000..3b89c8c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__getdents.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __getdents
+ .align 4
+ .ent __getdents
+
+__getdents:
+ .set push
+ .set noreorder
+ li v0, __NR_getdents
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __getdents
+.hidden _C_LABEL(__getdents)
diff --git a/libc/arch-mips64/syscalls/__getdents64.S b/libc/arch-mips64/syscalls/__getdents64.S
new file mode 100644
index 0000000..eac06aa
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__getdents64.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __getdents64
+ .align 4
+ .ent __getdents64
+
+__getdents64:
+ .set push
+ .set noreorder
+ li v0, __NR_getdents64
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __getdents64
+.hidden _C_LABEL(__getdents64)
diff --git a/libc/arch-mips64/syscalls/__getpriority.S b/libc/arch-mips64/syscalls/__getpriority.S
new file mode 100644
index 0000000..e3cd90e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__getpriority.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __getpriority
+ .align 4
+ .ent __getpriority
+
+__getpriority:
+ .set push
+ .set noreorder
+ li v0, __NR_getpriority
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __getpriority
+.hidden _C_LABEL(__getpriority)
diff --git a/libc/arch-mips64/syscalls/__ioctl.S b/libc/arch-mips64/syscalls/__ioctl.S
new file mode 100644
index 0000000..c3bd575
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__ioctl.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __ioctl
+ .align 4
+ .ent __ioctl
+
+__ioctl:
+ .set push
+ .set noreorder
+ li v0, __NR_ioctl
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __ioctl
+.hidden _C_LABEL(__ioctl)
diff --git a/libc/arch-mips64/syscalls/__openat.S b/libc/arch-mips64/syscalls/__openat.S
new file mode 100644
index 0000000..0f14454
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__openat.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __openat
+ .align 4
+ .ent __openat
+
+__openat:
+ .set push
+ .set noreorder
+ li v0, __NR_openat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __openat
+.hidden _C_LABEL(__openat)
diff --git a/libc/arch-mips64/syscalls/__ppoll.S b/libc/arch-mips64/syscalls/__ppoll.S
new file mode 100644
index 0000000..ac7acb9
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__ppoll.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __ppoll
+ .align 4
+ .ent __ppoll
+
+__ppoll:
+ .set push
+ .set noreorder
+ li v0, __NR_ppoll
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __ppoll
+.hidden _C_LABEL(__ppoll)
diff --git a/libc/arch-mips64/syscalls/__pselect6.S b/libc/arch-mips64/syscalls/__pselect6.S
new file mode 100644
index 0000000..1e5ac2f
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__pselect6.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __pselect6
+ .align 4
+ .ent __pselect6
+
+__pselect6:
+ .set push
+ .set noreorder
+ li v0, __NR_pselect6
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __pselect6
+.hidden _C_LABEL(__pselect6)
diff --git a/libc/arch-mips64/syscalls/__ptrace.S b/libc/arch-mips64/syscalls/__ptrace.S
new file mode 100644
index 0000000..79b75b2
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__ptrace.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __ptrace
+ .align 4
+ .ent __ptrace
+
+__ptrace:
+ .set push
+ .set noreorder
+ li v0, __NR_ptrace
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __ptrace
+.hidden _C_LABEL(__ptrace)
diff --git a/libc/arch-mips64/syscalls/__reboot.S b/libc/arch-mips64/syscalls/__reboot.S
new file mode 100644
index 0000000..31ae824
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__reboot.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __reboot
+ .align 4
+ .ent __reboot
+
+__reboot:
+ .set push
+ .set noreorder
+ li v0, __NR_reboot
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __reboot
+.hidden _C_LABEL(__reboot)
diff --git a/libc/arch-mips64/syscalls/__rt_sigaction.S b/libc/arch-mips64/syscalls/__rt_sigaction.S
new file mode 100644
index 0000000..ef537a4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__rt_sigaction.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __rt_sigaction
+ .align 4
+ .ent __rt_sigaction
+
+__rt_sigaction:
+ .set push
+ .set noreorder
+ li v0, __NR_rt_sigaction
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __rt_sigaction
+.hidden _C_LABEL(__rt_sigaction)
diff --git a/libc/arch-mips64/syscalls/__rt_sigpending.S b/libc/arch-mips64/syscalls/__rt_sigpending.S
new file mode 100644
index 0000000..2dc1bf6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__rt_sigpending.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __rt_sigpending
+ .align 4
+ .ent __rt_sigpending
+
+__rt_sigpending:
+ .set push
+ .set noreorder
+ li v0, __NR_rt_sigpending
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __rt_sigpending
+.hidden _C_LABEL(__rt_sigpending)
diff --git a/libc/arch-mips64/syscalls/__rt_sigprocmask.S b/libc/arch-mips64/syscalls/__rt_sigprocmask.S
new file mode 100644
index 0000000..2814d66
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__rt_sigprocmask.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __rt_sigprocmask
+ .align 4
+ .ent __rt_sigprocmask
+
+__rt_sigprocmask:
+ .set push
+ .set noreorder
+ li v0, __NR_rt_sigprocmask
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __rt_sigprocmask
+.hidden _C_LABEL(__rt_sigprocmask)
diff --git a/libc/arch-mips64/syscalls/__rt_sigsuspend.S b/libc/arch-mips64/syscalls/__rt_sigsuspend.S
new file mode 100644
index 0000000..83c1990
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__rt_sigsuspend.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __rt_sigsuspend
+ .align 4
+ .ent __rt_sigsuspend
+
+__rt_sigsuspend:
+ .set push
+ .set noreorder
+ li v0, __NR_rt_sigsuspend
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __rt_sigsuspend
+.hidden _C_LABEL(__rt_sigsuspend)
diff --git a/libc/arch-mips64/syscalls/__rt_sigtimedwait.S b/libc/arch-mips64/syscalls/__rt_sigtimedwait.S
new file mode 100644
index 0000000..48daea8
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__rt_sigtimedwait.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __rt_sigtimedwait
+ .align 4
+ .ent __rt_sigtimedwait
+
+__rt_sigtimedwait:
+ .set push
+ .set noreorder
+ li v0, __NR_rt_sigtimedwait
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __rt_sigtimedwait
+.hidden _C_LABEL(__rt_sigtimedwait)
diff --git a/libc/arch-mips64/syscalls/__sched_getaffinity.S b/libc/arch-mips64/syscalls/__sched_getaffinity.S
new file mode 100644
index 0000000..006e395
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__sched_getaffinity.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __sched_getaffinity
+ .align 4
+ .ent __sched_getaffinity
+
+__sched_getaffinity:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_getaffinity
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __sched_getaffinity
+.hidden _C_LABEL(__sched_getaffinity)
diff --git a/libc/arch-mips64/syscalls/__set_thread_area.S b/libc/arch-mips64/syscalls/__set_thread_area.S
new file mode 100644
index 0000000..009d004
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__set_thread_area.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __set_thread_area
+ .align 4
+ .ent __set_thread_area
+
+__set_thread_area:
+ .set push
+ .set noreorder
+ li v0, __NR_set_thread_area
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __set_thread_area
+.hidden _C_LABEL(__set_thread_area)
diff --git a/libc/arch-mips64/syscalls/__set_tid_address.S b/libc/arch-mips64/syscalls/__set_tid_address.S
new file mode 100644
index 0000000..4c1f97d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__set_tid_address.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __set_tid_address
+ .align 4
+ .ent __set_tid_address
+
+__set_tid_address:
+ .set push
+ .set noreorder
+ li v0, __NR_set_tid_address
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __set_tid_address
+.hidden _C_LABEL(__set_tid_address)
diff --git a/libc/arch-mips64/syscalls/__syslog.S b/libc/arch-mips64/syscalls/__syslog.S
new file mode 100644
index 0000000..2291401
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__syslog.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __syslog
+ .align 4
+ .ent __syslog
+
+__syslog:
+ .set push
+ .set noreorder
+ li v0, __NR_syslog
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __syslog
+.hidden _C_LABEL(__syslog)
diff --git a/libc/arch-mips64/syscalls/__timer_create.S b/libc/arch-mips64/syscalls/__timer_create.S
new file mode 100644
index 0000000..aa024b7
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__timer_create.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __timer_create
+ .align 4
+ .ent __timer_create
+
+__timer_create:
+ .set push
+ .set noreorder
+ li v0, __NR_timer_create
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __timer_create
+.hidden _C_LABEL(__timer_create)
diff --git a/libc/arch-mips64/syscalls/__timer_delete.S b/libc/arch-mips64/syscalls/__timer_delete.S
new file mode 100644
index 0000000..024f0c4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__timer_delete.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __timer_delete
+ .align 4
+ .ent __timer_delete
+
+__timer_delete:
+ .set push
+ .set noreorder
+ li v0, __NR_timer_delete
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __timer_delete
+.hidden _C_LABEL(__timer_delete)
diff --git a/libc/arch-mips64/syscalls/__timer_getoverrun.S b/libc/arch-mips64/syscalls/__timer_getoverrun.S
new file mode 100644
index 0000000..0931111
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__timer_getoverrun.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __timer_getoverrun
+ .align 4
+ .ent __timer_getoverrun
+
+__timer_getoverrun:
+ .set push
+ .set noreorder
+ li v0, __NR_timer_getoverrun
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __timer_getoverrun
+.hidden _C_LABEL(__timer_getoverrun)
diff --git a/libc/arch-mips64/syscalls/__timer_gettime.S b/libc/arch-mips64/syscalls/__timer_gettime.S
new file mode 100644
index 0000000..4eb5f71
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__timer_gettime.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __timer_gettime
+ .align 4
+ .ent __timer_gettime
+
+__timer_gettime:
+ .set push
+ .set noreorder
+ li v0, __NR_timer_gettime
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __timer_gettime
+.hidden _C_LABEL(__timer_gettime)
diff --git a/libc/arch-mips64/syscalls/__timer_settime.S b/libc/arch-mips64/syscalls/__timer_settime.S
new file mode 100644
index 0000000..ecac0c5
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__timer_settime.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __timer_settime
+ .align 4
+ .ent __timer_settime
+
+__timer_settime:
+ .set push
+ .set noreorder
+ li v0, __NR_timer_settime
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __timer_settime
+.hidden _C_LABEL(__timer_settime)
diff --git a/libc/arch-mips64/syscalls/__waitid.S b/libc/arch-mips64/syscalls/__waitid.S
new file mode 100644
index 0000000..caba21e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/__waitid.S
@@ -0,0 +1,32 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl __waitid
+ .align 4
+ .ent __waitid
+
+__waitid:
+ .set push
+ .set noreorder
+ li v0, __NR_waitid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end __waitid
+.hidden _C_LABEL(__waitid)
diff --git a/libc/arch-mips64/syscalls/_exit.S b/libc/arch-mips64/syscalls/_exit.S
new file mode 100644
index 0000000..87aff94
--- /dev/null
+++ b/libc/arch-mips64/syscalls/_exit.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl _exit
+ .align 4
+ .ent _exit
+
+_exit:
+ .set push
+ .set noreorder
+ li v0, __NR_exit_group
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end _exit
diff --git a/libc/arch-mips64/syscalls/_flush_cache.S b/libc/arch-mips64/syscalls/_flush_cache.S
new file mode 100644
index 0000000..c2f8cd6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/_flush_cache.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl _flush_cache
+ .align 4
+ .ent _flush_cache
+
+_flush_cache:
+ .set push
+ .set noreorder
+ li v0, __NR_cacheflush
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end _flush_cache
diff --git a/libc/arch-mips64/syscalls/accept.S b/libc/arch-mips64/syscalls/accept.S
new file mode 100644
index 0000000..dc9ac59
--- /dev/null
+++ b/libc/arch-mips64/syscalls/accept.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl accept
+ .align 4
+ .ent accept
+
+accept:
+ .set push
+ .set noreorder
+ li v0, __NR_accept
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end accept
diff --git a/libc/arch-mips64/syscalls/acct.S b/libc/arch-mips64/syscalls/acct.S
new file mode 100644
index 0000000..0b23866
--- /dev/null
+++ b/libc/arch-mips64/syscalls/acct.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl acct
+ .align 4
+ .ent acct
+
+acct:
+ .set push
+ .set noreorder
+ li v0, __NR_acct
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end acct
diff --git a/libc/arch-mips64/syscalls/bind.S b/libc/arch-mips64/syscalls/bind.S
new file mode 100644
index 0000000..da81dad
--- /dev/null
+++ b/libc/arch-mips64/syscalls/bind.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl bind
+ .align 4
+ .ent bind
+
+bind:
+ .set push
+ .set noreorder
+ li v0, __NR_bind
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end bind
diff --git a/libc/arch-mips64/syscalls/capget.S b/libc/arch-mips64/syscalls/capget.S
new file mode 100644
index 0000000..26d74b1
--- /dev/null
+++ b/libc/arch-mips64/syscalls/capget.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl capget
+ .align 4
+ .ent capget
+
+capget:
+ .set push
+ .set noreorder
+ li v0, __NR_capget
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end capget
diff --git a/libc/arch-mips64/syscalls/capset.S b/libc/arch-mips64/syscalls/capset.S
new file mode 100644
index 0000000..b4b87de
--- /dev/null
+++ b/libc/arch-mips64/syscalls/capset.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl capset
+ .align 4
+ .ent capset
+
+capset:
+ .set push
+ .set noreorder
+ li v0, __NR_capset
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end capset
diff --git a/libc/arch-mips64/syscalls/chdir.S b/libc/arch-mips64/syscalls/chdir.S
new file mode 100644
index 0000000..af3546a
--- /dev/null
+++ b/libc/arch-mips64/syscalls/chdir.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl chdir
+ .align 4
+ .ent chdir
+
+chdir:
+ .set push
+ .set noreorder
+ li v0, __NR_chdir
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end chdir
diff --git a/libc/arch-mips64/syscalls/chroot.S b/libc/arch-mips64/syscalls/chroot.S
new file mode 100644
index 0000000..b992774
--- /dev/null
+++ b/libc/arch-mips64/syscalls/chroot.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl chroot
+ .align 4
+ .ent chroot
+
+chroot:
+ .set push
+ .set noreorder
+ li v0, __NR_chroot
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end chroot
diff --git a/libc/arch-mips64/syscalls/clock_getres.S b/libc/arch-mips64/syscalls/clock_getres.S
new file mode 100644
index 0000000..f277ab1
--- /dev/null
+++ b/libc/arch-mips64/syscalls/clock_getres.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl clock_getres
+ .align 4
+ .ent clock_getres
+
+clock_getres:
+ .set push
+ .set noreorder
+ li v0, __NR_clock_getres
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end clock_getres
diff --git a/libc/arch-mips64/syscalls/clock_gettime.S b/libc/arch-mips64/syscalls/clock_gettime.S
new file mode 100644
index 0000000..8200e75
--- /dev/null
+++ b/libc/arch-mips64/syscalls/clock_gettime.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl clock_gettime
+ .align 4
+ .ent clock_gettime
+
+clock_gettime:
+ .set push
+ .set noreorder
+ li v0, __NR_clock_gettime
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end clock_gettime
diff --git a/libc/arch-mips64/syscalls/clock_nanosleep.S b/libc/arch-mips64/syscalls/clock_nanosleep.S
new file mode 100644
index 0000000..9ac95fc
--- /dev/null
+++ b/libc/arch-mips64/syscalls/clock_nanosleep.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl clock_nanosleep
+ .align 4
+ .ent clock_nanosleep
+
+clock_nanosleep:
+ .set push
+ .set noreorder
+ li v0, __NR_clock_nanosleep
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end clock_nanosleep
diff --git a/libc/arch-mips64/syscalls/clock_settime.S b/libc/arch-mips64/syscalls/clock_settime.S
new file mode 100644
index 0000000..a8cd723
--- /dev/null
+++ b/libc/arch-mips64/syscalls/clock_settime.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl clock_settime
+ .align 4
+ .ent clock_settime
+
+clock_settime:
+ .set push
+ .set noreorder
+ li v0, __NR_clock_settime
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end clock_settime
diff --git a/libc/arch-mips64/syscalls/close.S b/libc/arch-mips64/syscalls/close.S
new file mode 100644
index 0000000..cfe5c51
--- /dev/null
+++ b/libc/arch-mips64/syscalls/close.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl close
+ .align 4
+ .ent close
+
+close:
+ .set push
+ .set noreorder
+ li v0, __NR_close
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end close
diff --git a/libc/arch-mips64/syscalls/connect.S b/libc/arch-mips64/syscalls/connect.S
new file mode 100644
index 0000000..80600bb
--- /dev/null
+++ b/libc/arch-mips64/syscalls/connect.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl connect
+ .align 4
+ .ent connect
+
+connect:
+ .set push
+ .set noreorder
+ li v0, __NR_connect
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end connect
diff --git a/libc/arch-mips64/syscalls/delete_module.S b/libc/arch-mips64/syscalls/delete_module.S
new file mode 100644
index 0000000..cf2579d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/delete_module.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl delete_module
+ .align 4
+ .ent delete_module
+
+delete_module:
+ .set push
+ .set noreorder
+ li v0, __NR_delete_module
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end delete_module
diff --git a/libc/arch-mips64/syscalls/dup.S b/libc/arch-mips64/syscalls/dup.S
new file mode 100644
index 0000000..0a92e57
--- /dev/null
+++ b/libc/arch-mips64/syscalls/dup.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl dup
+ .align 4
+ .ent dup
+
+dup:
+ .set push
+ .set noreorder
+ li v0, __NR_dup
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end dup
diff --git a/libc/arch-mips64/syscalls/dup3.S b/libc/arch-mips64/syscalls/dup3.S
new file mode 100644
index 0000000..e9fba1e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/dup3.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl dup3
+ .align 4
+ .ent dup3
+
+dup3:
+ .set push
+ .set noreorder
+ li v0, __NR_dup3
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end dup3
diff --git a/libc/arch-mips64/syscalls/epoll_create1.S b/libc/arch-mips64/syscalls/epoll_create1.S
new file mode 100644
index 0000000..9c41868
--- /dev/null
+++ b/libc/arch-mips64/syscalls/epoll_create1.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl epoll_create1
+ .align 4
+ .ent epoll_create1
+
+epoll_create1:
+ .set push
+ .set noreorder
+ li v0, __NR_epoll_create1
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end epoll_create1
diff --git a/libc/arch-mips64/syscalls/epoll_ctl.S b/libc/arch-mips64/syscalls/epoll_ctl.S
new file mode 100644
index 0000000..5f18979
--- /dev/null
+++ b/libc/arch-mips64/syscalls/epoll_ctl.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl epoll_ctl
+ .align 4
+ .ent epoll_ctl
+
+epoll_ctl:
+ .set push
+ .set noreorder
+ li v0, __NR_epoll_ctl
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end epoll_ctl
diff --git a/libc/arch-mips64/syscalls/eventfd.S b/libc/arch-mips64/syscalls/eventfd.S
new file mode 100644
index 0000000..9cb87ca
--- /dev/null
+++ b/libc/arch-mips64/syscalls/eventfd.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl eventfd
+ .align 4
+ .ent eventfd
+
+eventfd:
+ .set push
+ .set noreorder
+ li v0, __NR_eventfd2
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end eventfd
diff --git a/libc/arch-mips64/syscalls/execve.S b/libc/arch-mips64/syscalls/execve.S
new file mode 100644
index 0000000..8edfc34
--- /dev/null
+++ b/libc/arch-mips64/syscalls/execve.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl execve
+ .align 4
+ .ent execve
+
+execve:
+ .set push
+ .set noreorder
+ li v0, __NR_execve
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end execve
diff --git a/libc/arch-mips64/syscalls/faccessat.S b/libc/arch-mips64/syscalls/faccessat.S
new file mode 100644
index 0000000..14de073
--- /dev/null
+++ b/libc/arch-mips64/syscalls/faccessat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl faccessat
+ .align 4
+ .ent faccessat
+
+faccessat:
+ .set push
+ .set noreorder
+ li v0, __NR_faccessat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end faccessat
diff --git a/libc/arch-mips64/syscalls/fallocate.S b/libc/arch-mips64/syscalls/fallocate.S
new file mode 100644
index 0000000..dea8d27
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fallocate.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fallocate
+ .align 4
+ .ent fallocate
+
+fallocate:
+ .set push
+ .set noreorder
+ li v0, __NR_fallocate
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fallocate
+
+ .globl _C_LABEL(fallocate64)
+ .equ _C_LABEL(fallocate64), _C_LABEL(fallocate)
diff --git a/libc/arch-mips64/syscalls/fchdir.S b/libc/arch-mips64/syscalls/fchdir.S
new file mode 100644
index 0000000..1b5e7cb
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fchdir.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fchdir
+ .align 4
+ .ent fchdir
+
+fchdir:
+ .set push
+ .set noreorder
+ li v0, __NR_fchdir
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fchdir
diff --git a/libc/arch-mips64/syscalls/fchmod.S b/libc/arch-mips64/syscalls/fchmod.S
new file mode 100644
index 0000000..b9ce347
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fchmod.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fchmod
+ .align 4
+ .ent fchmod
+
+fchmod:
+ .set push
+ .set noreorder
+ li v0, __NR_fchmod
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fchmod
diff --git a/libc/arch-mips64/syscalls/fchmodat.S b/libc/arch-mips64/syscalls/fchmodat.S
new file mode 100644
index 0000000..f21aea7
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fchmodat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fchmodat
+ .align 4
+ .ent fchmodat
+
+fchmodat:
+ .set push
+ .set noreorder
+ li v0, __NR_fchmodat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fchmodat
diff --git a/libc/arch-mips64/syscalls/fchown.S b/libc/arch-mips64/syscalls/fchown.S
new file mode 100644
index 0000000..2eb7fa4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fchown.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fchown
+ .align 4
+ .ent fchown
+
+fchown:
+ .set push
+ .set noreorder
+ li v0, __NR_fchown
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fchown
diff --git a/libc/arch-mips64/syscalls/fchownat.S b/libc/arch-mips64/syscalls/fchownat.S
new file mode 100644
index 0000000..896ba43
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fchownat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fchownat
+ .align 4
+ .ent fchownat
+
+fchownat:
+ .set push
+ .set noreorder
+ li v0, __NR_fchownat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fchownat
diff --git a/libc/arch-mips64/syscalls/fcntl.S b/libc/arch-mips64/syscalls/fcntl.S
new file mode 100644
index 0000000..755361d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fcntl.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fcntl
+ .align 4
+ .ent fcntl
+
+fcntl:
+ .set push
+ .set noreorder
+ li v0, __NR_fcntl
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fcntl
diff --git a/libc/arch-mips64/syscalls/fdatasync.S b/libc/arch-mips64/syscalls/fdatasync.S
new file mode 100644
index 0000000..f036248
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fdatasync.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fdatasync
+ .align 4
+ .ent fdatasync
+
+fdatasync:
+ .set push
+ .set noreorder
+ li v0, __NR_fdatasync
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fdatasync
diff --git a/libc/arch-mips64/syscalls/fgetxattr.S b/libc/arch-mips64/syscalls/fgetxattr.S
new file mode 100644
index 0000000..0cd6ad7
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fgetxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fgetxattr
+ .align 4
+ .ent fgetxattr
+
+fgetxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_fgetxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fgetxattr
diff --git a/libc/arch-mips64/syscalls/flistxattr.S b/libc/arch-mips64/syscalls/flistxattr.S
new file mode 100644
index 0000000..2e8961b
--- /dev/null
+++ b/libc/arch-mips64/syscalls/flistxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl flistxattr
+ .align 4
+ .ent flistxattr
+
+flistxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_flistxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end flistxattr
diff --git a/libc/arch-mips64/syscalls/flock.S b/libc/arch-mips64/syscalls/flock.S
new file mode 100644
index 0000000..93051d3
--- /dev/null
+++ b/libc/arch-mips64/syscalls/flock.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl flock
+ .align 4
+ .ent flock
+
+flock:
+ .set push
+ .set noreorder
+ li v0, __NR_flock
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end flock
diff --git a/libc/arch-mips64/syscalls/fremovexattr.S b/libc/arch-mips64/syscalls/fremovexattr.S
new file mode 100644
index 0000000..6ef8c12
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fremovexattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fremovexattr
+ .align 4
+ .ent fremovexattr
+
+fremovexattr:
+ .set push
+ .set noreorder
+ li v0, __NR_fremovexattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fremovexattr
diff --git a/libc/arch-mips64/syscalls/fsetxattr.S b/libc/arch-mips64/syscalls/fsetxattr.S
new file mode 100644
index 0000000..89e0de7
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fsetxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fsetxattr
+ .align 4
+ .ent fsetxattr
+
+fsetxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_fsetxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fsetxattr
diff --git a/libc/arch-mips64/syscalls/fstat.S b/libc/arch-mips64/syscalls/fstat.S
new file mode 100644
index 0000000..4c3e236
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fstat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fstat
+ .align 4
+ .ent fstat
+
+fstat:
+ .set push
+ .set noreorder
+ li v0, __NR_fstat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fstat
diff --git a/libc/arch-mips64/syscalls/fstatat.S b/libc/arch-mips64/syscalls/fstatat.S
new file mode 100644
index 0000000..630debe
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fstatat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fstatat
+ .align 4
+ .ent fstatat
+
+fstatat:
+ .set push
+ .set noreorder
+ li v0, __NR_newfstatat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fstatat
diff --git a/libc/arch-mips64/syscalls/fstatfs.S b/libc/arch-mips64/syscalls/fstatfs.S
new file mode 100644
index 0000000..3e38227
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fstatfs.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fstatfs
+ .align 4
+ .ent fstatfs
+
+fstatfs:
+ .set push
+ .set noreorder
+ li v0, __NR_fstatfs
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fstatfs
diff --git a/libc/arch-mips64/syscalls/fsync.S b/libc/arch-mips64/syscalls/fsync.S
new file mode 100644
index 0000000..08f77f0
--- /dev/null
+++ b/libc/arch-mips64/syscalls/fsync.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl fsync
+ .align 4
+ .ent fsync
+
+fsync:
+ .set push
+ .set noreorder
+ li v0, __NR_fsync
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end fsync
diff --git a/libc/arch-mips64/syscalls/ftruncate.S b/libc/arch-mips64/syscalls/ftruncate.S
new file mode 100644
index 0000000..507825d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/ftruncate.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl ftruncate
+ .align 4
+ .ent ftruncate
+
+ftruncate:
+ .set push
+ .set noreorder
+ li v0, __NR_ftruncate
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end ftruncate
+
+ .globl _C_LABEL(ftruncate64)
+ .equ _C_LABEL(ftruncate64), _C_LABEL(ftruncate)
diff --git a/libc/arch-mips64/syscalls/futex.S b/libc/arch-mips64/syscalls/futex.S
new file mode 100644
index 0000000..edbacba
--- /dev/null
+++ b/libc/arch-mips64/syscalls/futex.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl futex
+ .align 4
+ .ent futex
+
+futex:
+ .set push
+ .set noreorder
+ li v0, __NR_futex
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end futex
diff --git a/libc/arch-mips64/syscalls/getegid.S b/libc/arch-mips64/syscalls/getegid.S
new file mode 100644
index 0000000..d014386
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getegid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getegid
+ .align 4
+ .ent getegid
+
+getegid:
+ .set push
+ .set noreorder
+ li v0, __NR_getegid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getegid
diff --git a/libc/arch-mips64/syscalls/geteuid.S b/libc/arch-mips64/syscalls/geteuid.S
new file mode 100644
index 0000000..ec63f6c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/geteuid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl geteuid
+ .align 4
+ .ent geteuid
+
+geteuid:
+ .set push
+ .set noreorder
+ li v0, __NR_geteuid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end geteuid
diff --git a/libc/arch-mips64/syscalls/getgid.S b/libc/arch-mips64/syscalls/getgid.S
new file mode 100644
index 0000000..531d364
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getgid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getgid
+ .align 4
+ .ent getgid
+
+getgid:
+ .set push
+ .set noreorder
+ li v0, __NR_getgid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getgid
diff --git a/libc/arch-mips64/syscalls/getgroups.S b/libc/arch-mips64/syscalls/getgroups.S
new file mode 100644
index 0000000..b7fcef6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getgroups.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getgroups
+ .align 4
+ .ent getgroups
+
+getgroups:
+ .set push
+ .set noreorder
+ li v0, __NR_getgroups
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getgroups
diff --git a/libc/arch-mips64/syscalls/getitimer.S b/libc/arch-mips64/syscalls/getitimer.S
new file mode 100644
index 0000000..4f9bc63
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getitimer.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getitimer
+ .align 4
+ .ent getitimer
+
+getitimer:
+ .set push
+ .set noreorder
+ li v0, __NR_getitimer
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getitimer
diff --git a/libc/arch-mips64/syscalls/getpeername.S b/libc/arch-mips64/syscalls/getpeername.S
new file mode 100644
index 0000000..695fe6a
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getpeername.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getpeername
+ .align 4
+ .ent getpeername
+
+getpeername:
+ .set push
+ .set noreorder
+ li v0, __NR_getpeername
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getpeername
diff --git a/libc/arch-mips64/syscalls/getpgid.S b/libc/arch-mips64/syscalls/getpgid.S
new file mode 100644
index 0000000..46787d6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getpgid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getpgid
+ .align 4
+ .ent getpgid
+
+getpgid:
+ .set push
+ .set noreorder
+ li v0, __NR_getpgid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getpgid
diff --git a/libc/arch-mips64/syscalls/getpid.S b/libc/arch-mips64/syscalls/getpid.S
new file mode 100644
index 0000000..4f3f58f
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getpid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getpid
+ .align 4
+ .ent getpid
+
+getpid:
+ .set push
+ .set noreorder
+ li v0, __NR_getpid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getpid
diff --git a/libc/arch-mips64/syscalls/getppid.S b/libc/arch-mips64/syscalls/getppid.S
new file mode 100644
index 0000000..0bcab00
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getppid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getppid
+ .align 4
+ .ent getppid
+
+getppid:
+ .set push
+ .set noreorder
+ li v0, __NR_getppid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getppid
diff --git a/libc/arch-mips64/syscalls/getresgid.S b/libc/arch-mips64/syscalls/getresgid.S
new file mode 100644
index 0000000..48e605b
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getresgid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getresgid
+ .align 4
+ .ent getresgid
+
+getresgid:
+ .set push
+ .set noreorder
+ li v0, __NR_getresgid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getresgid
diff --git a/libc/arch-mips64/syscalls/getresuid.S b/libc/arch-mips64/syscalls/getresuid.S
new file mode 100644
index 0000000..79987d6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getresuid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getresuid
+ .align 4
+ .ent getresuid
+
+getresuid:
+ .set push
+ .set noreorder
+ li v0, __NR_getresuid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getresuid
diff --git a/libc/arch-mips64/syscalls/getrlimit.S b/libc/arch-mips64/syscalls/getrlimit.S
new file mode 100644
index 0000000..b944426
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getrlimit.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getrlimit
+ .align 4
+ .ent getrlimit
+
+getrlimit:
+ .set push
+ .set noreorder
+ li v0, __NR_getrlimit
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getrlimit
+
+ .globl _C_LABEL(getrlimit64)
+ .equ _C_LABEL(getrlimit64), _C_LABEL(getrlimit)
diff --git a/libc/arch-mips64/syscalls/getrusage.S b/libc/arch-mips64/syscalls/getrusage.S
new file mode 100644
index 0000000..dd57c38
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getrusage.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getrusage
+ .align 4
+ .ent getrusage
+
+getrusage:
+ .set push
+ .set noreorder
+ li v0, __NR_getrusage
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getrusage
diff --git a/libc/arch-mips64/syscalls/getsid.S b/libc/arch-mips64/syscalls/getsid.S
new file mode 100644
index 0000000..5fb9e1b
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getsid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getsid
+ .align 4
+ .ent getsid
+
+getsid:
+ .set push
+ .set noreorder
+ li v0, __NR_getsid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getsid
diff --git a/libc/arch-mips64/syscalls/getsockname.S b/libc/arch-mips64/syscalls/getsockname.S
new file mode 100644
index 0000000..44026bf
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getsockname.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getsockname
+ .align 4
+ .ent getsockname
+
+getsockname:
+ .set push
+ .set noreorder
+ li v0, __NR_getsockname
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getsockname
diff --git a/libc/arch-mips64/syscalls/getsockopt.S b/libc/arch-mips64/syscalls/getsockopt.S
new file mode 100644
index 0000000..8493faa
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getsockopt.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getsockopt
+ .align 4
+ .ent getsockopt
+
+getsockopt:
+ .set push
+ .set noreorder
+ li v0, __NR_getsockopt
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getsockopt
diff --git a/libc/arch-mips64/syscalls/gettid.S b/libc/arch-mips64/syscalls/gettid.S
new file mode 100644
index 0000000..e03bb4e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/gettid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl gettid
+ .align 4
+ .ent gettid
+
+gettid:
+ .set push
+ .set noreorder
+ li v0, __NR_gettid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end gettid
diff --git a/libc/arch-mips64/syscalls/gettimeofday.S b/libc/arch-mips64/syscalls/gettimeofday.S
new file mode 100644
index 0000000..e1e5c04
--- /dev/null
+++ b/libc/arch-mips64/syscalls/gettimeofday.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl gettimeofday
+ .align 4
+ .ent gettimeofday
+
+gettimeofday:
+ .set push
+ .set noreorder
+ li v0, __NR_gettimeofday
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end gettimeofday
diff --git a/libc/arch-mips64/syscalls/getuid.S b/libc/arch-mips64/syscalls/getuid.S
new file mode 100644
index 0000000..e48f4a6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getuid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getuid
+ .align 4
+ .ent getuid
+
+getuid:
+ .set push
+ .set noreorder
+ li v0, __NR_getuid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getuid
diff --git a/libc/arch-mips64/syscalls/getxattr.S b/libc/arch-mips64/syscalls/getxattr.S
new file mode 100644
index 0000000..b46e4d9
--- /dev/null
+++ b/libc/arch-mips64/syscalls/getxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl getxattr
+ .align 4
+ .ent getxattr
+
+getxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_getxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end getxattr
diff --git a/libc/arch-mips64/syscalls/init_module.S b/libc/arch-mips64/syscalls/init_module.S
new file mode 100644
index 0000000..c5b2bcf
--- /dev/null
+++ b/libc/arch-mips64/syscalls/init_module.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl init_module
+ .align 4
+ .ent init_module
+
+init_module:
+ .set push
+ .set noreorder
+ li v0, __NR_init_module
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end init_module
diff --git a/libc/arch-mips64/syscalls/inotify_add_watch.S b/libc/arch-mips64/syscalls/inotify_add_watch.S
new file mode 100644
index 0000000..c4c8dbf
--- /dev/null
+++ b/libc/arch-mips64/syscalls/inotify_add_watch.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl inotify_add_watch
+ .align 4
+ .ent inotify_add_watch
+
+inotify_add_watch:
+ .set push
+ .set noreorder
+ li v0, __NR_inotify_add_watch
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end inotify_add_watch
diff --git a/libc/arch-mips64/syscalls/inotify_init1.S b/libc/arch-mips64/syscalls/inotify_init1.S
new file mode 100644
index 0000000..b0c7dcc
--- /dev/null
+++ b/libc/arch-mips64/syscalls/inotify_init1.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl inotify_init1
+ .align 4
+ .ent inotify_init1
+
+inotify_init1:
+ .set push
+ .set noreorder
+ li v0, __NR_inotify_init1
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end inotify_init1
diff --git a/libc/arch-mips64/syscalls/inotify_rm_watch.S b/libc/arch-mips64/syscalls/inotify_rm_watch.S
new file mode 100644
index 0000000..4b6078e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/inotify_rm_watch.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl inotify_rm_watch
+ .align 4
+ .ent inotify_rm_watch
+
+inotify_rm_watch:
+ .set push
+ .set noreorder
+ li v0, __NR_inotify_rm_watch
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end inotify_rm_watch
diff --git a/libc/arch-mips64/syscalls/ioprio_get.S b/libc/arch-mips64/syscalls/ioprio_get.S
new file mode 100644
index 0000000..ebb4375
--- /dev/null
+++ b/libc/arch-mips64/syscalls/ioprio_get.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl ioprio_get
+ .align 4
+ .ent ioprio_get
+
+ioprio_get:
+ .set push
+ .set noreorder
+ li v0, __NR_ioprio_get
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end ioprio_get
diff --git a/libc/arch-mips64/syscalls/ioprio_set.S b/libc/arch-mips64/syscalls/ioprio_set.S
new file mode 100644
index 0000000..44daba9
--- /dev/null
+++ b/libc/arch-mips64/syscalls/ioprio_set.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl ioprio_set
+ .align 4
+ .ent ioprio_set
+
+ioprio_set:
+ .set push
+ .set noreorder
+ li v0, __NR_ioprio_set
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end ioprio_set
diff --git a/libc/arch-mips64/syscalls/kill.S b/libc/arch-mips64/syscalls/kill.S
new file mode 100644
index 0000000..2e4aa42
--- /dev/null
+++ b/libc/arch-mips64/syscalls/kill.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl kill
+ .align 4
+ .ent kill
+
+kill:
+ .set push
+ .set noreorder
+ li v0, __NR_kill
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end kill
diff --git a/libc/arch-mips64/syscalls/klogctl.S b/libc/arch-mips64/syscalls/klogctl.S
new file mode 100644
index 0000000..1c10f95
--- /dev/null
+++ b/libc/arch-mips64/syscalls/klogctl.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl klogctl
+ .align 4
+ .ent klogctl
+
+klogctl:
+ .set push
+ .set noreorder
+ li v0, __NR_syslog
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end klogctl
diff --git a/libc/arch-mips64/syscalls/lgetxattr.S b/libc/arch-mips64/syscalls/lgetxattr.S
new file mode 100644
index 0000000..c402e81
--- /dev/null
+++ b/libc/arch-mips64/syscalls/lgetxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl lgetxattr
+ .align 4
+ .ent lgetxattr
+
+lgetxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_lgetxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end lgetxattr
diff --git a/libc/arch-mips64/syscalls/linkat.S b/libc/arch-mips64/syscalls/linkat.S
new file mode 100644
index 0000000..e734144
--- /dev/null
+++ b/libc/arch-mips64/syscalls/linkat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl linkat
+ .align 4
+ .ent linkat
+
+linkat:
+ .set push
+ .set noreorder
+ li v0, __NR_linkat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end linkat
diff --git a/libc/arch-mips64/syscalls/listen.S b/libc/arch-mips64/syscalls/listen.S
new file mode 100644
index 0000000..93c1d52
--- /dev/null
+++ b/libc/arch-mips64/syscalls/listen.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl listen
+ .align 4
+ .ent listen
+
+listen:
+ .set push
+ .set noreorder
+ li v0, __NR_listen
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end listen
diff --git a/libc/arch-mips64/syscalls/listxattr.S b/libc/arch-mips64/syscalls/listxattr.S
new file mode 100644
index 0000000..f00402f
--- /dev/null
+++ b/libc/arch-mips64/syscalls/listxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl listxattr
+ .align 4
+ .ent listxattr
+
+listxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_listxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end listxattr
diff --git a/libc/arch-mips64/syscalls/llistxattr.S b/libc/arch-mips64/syscalls/llistxattr.S
new file mode 100644
index 0000000..2628185
--- /dev/null
+++ b/libc/arch-mips64/syscalls/llistxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl llistxattr
+ .align 4
+ .ent llistxattr
+
+llistxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_llistxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end llistxattr
diff --git a/libc/arch-mips64/syscalls/lremovexattr.S b/libc/arch-mips64/syscalls/lremovexattr.S
new file mode 100644
index 0000000..ef486cb
--- /dev/null
+++ b/libc/arch-mips64/syscalls/lremovexattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl lremovexattr
+ .align 4
+ .ent lremovexattr
+
+lremovexattr:
+ .set push
+ .set noreorder
+ li v0, __NR_lremovexattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end lremovexattr
diff --git a/libc/arch-mips64/syscalls/lseek.S b/libc/arch-mips64/syscalls/lseek.S
new file mode 100644
index 0000000..79c8dec
--- /dev/null
+++ b/libc/arch-mips64/syscalls/lseek.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl lseek
+ .align 4
+ .ent lseek
+
+lseek:
+ .set push
+ .set noreorder
+ li v0, __NR_lseek
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end lseek
+
+ .globl _C_LABEL(lseek64)
+ .equ _C_LABEL(lseek64), _C_LABEL(lseek)
diff --git a/libc/arch-mips64/syscalls/lsetxattr.S b/libc/arch-mips64/syscalls/lsetxattr.S
new file mode 100644
index 0000000..14a1aae
--- /dev/null
+++ b/libc/arch-mips64/syscalls/lsetxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl lsetxattr
+ .align 4
+ .ent lsetxattr
+
+lsetxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_lsetxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end lsetxattr
diff --git a/libc/arch-mips64/syscalls/madvise.S b/libc/arch-mips64/syscalls/madvise.S
new file mode 100644
index 0000000..8ca4124
--- /dev/null
+++ b/libc/arch-mips64/syscalls/madvise.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl madvise
+ .align 4
+ .ent madvise
+
+madvise:
+ .set push
+ .set noreorder
+ li v0, __NR_madvise
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end madvise
diff --git a/libc/arch-mips64/syscalls/mincore.S b/libc/arch-mips64/syscalls/mincore.S
new file mode 100644
index 0000000..9dbd21c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mincore.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mincore
+ .align 4
+ .ent mincore
+
+mincore:
+ .set push
+ .set noreorder
+ li v0, __NR_mincore
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mincore
diff --git a/libc/arch-mips64/syscalls/mkdirat.S b/libc/arch-mips64/syscalls/mkdirat.S
new file mode 100644
index 0000000..e652b23
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mkdirat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mkdirat
+ .align 4
+ .ent mkdirat
+
+mkdirat:
+ .set push
+ .set noreorder
+ li v0, __NR_mkdirat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mkdirat
diff --git a/libc/arch-mips64/syscalls/mknodat.S b/libc/arch-mips64/syscalls/mknodat.S
new file mode 100644
index 0000000..1cedbb4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mknodat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mknodat
+ .align 4
+ .ent mknodat
+
+mknodat:
+ .set push
+ .set noreorder
+ li v0, __NR_mknodat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mknodat
diff --git a/libc/arch-mips64/syscalls/mlock.S b/libc/arch-mips64/syscalls/mlock.S
new file mode 100644
index 0000000..18ab4ba
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mlock.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mlock
+ .align 4
+ .ent mlock
+
+mlock:
+ .set push
+ .set noreorder
+ li v0, __NR_mlock
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mlock
diff --git a/libc/arch-mips64/syscalls/mlockall.S b/libc/arch-mips64/syscalls/mlockall.S
new file mode 100644
index 0000000..50fb23c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mlockall.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mlockall
+ .align 4
+ .ent mlockall
+
+mlockall:
+ .set push
+ .set noreorder
+ li v0, __NR_mlockall
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mlockall
diff --git a/libc/arch-mips64/syscalls/mmap.S b/libc/arch-mips64/syscalls/mmap.S
new file mode 100644
index 0000000..1cde691
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mmap.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mmap
+ .align 4
+ .ent mmap
+
+mmap:
+ .set push
+ .set noreorder
+ li v0, __NR_mmap
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mmap
+
+ .globl _C_LABEL(mmap64)
+ .equ _C_LABEL(mmap64), _C_LABEL(mmap)
diff --git a/libc/arch-mips64/syscalls/mount.S b/libc/arch-mips64/syscalls/mount.S
new file mode 100644
index 0000000..595585e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mount.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mount
+ .align 4
+ .ent mount
+
+mount:
+ .set push
+ .set noreorder
+ li v0, __NR_mount
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mount
diff --git a/libc/arch-mips64/syscalls/mprotect.S b/libc/arch-mips64/syscalls/mprotect.S
new file mode 100644
index 0000000..77d9207
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mprotect.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mprotect
+ .align 4
+ .ent mprotect
+
+mprotect:
+ .set push
+ .set noreorder
+ li v0, __NR_mprotect
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mprotect
diff --git a/libc/arch-mips64/syscalls/mremap.S b/libc/arch-mips64/syscalls/mremap.S
new file mode 100644
index 0000000..33be57f
--- /dev/null
+++ b/libc/arch-mips64/syscalls/mremap.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl mremap
+ .align 4
+ .ent mremap
+
+mremap:
+ .set push
+ .set noreorder
+ li v0, __NR_mremap
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end mremap
diff --git a/libc/arch-mips64/syscalls/msync.S b/libc/arch-mips64/syscalls/msync.S
new file mode 100644
index 0000000..a5e29f6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/msync.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl msync
+ .align 4
+ .ent msync
+
+msync:
+ .set push
+ .set noreorder
+ li v0, __NR_msync
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end msync
diff --git a/libc/arch-mips64/syscalls/munlock.S b/libc/arch-mips64/syscalls/munlock.S
new file mode 100644
index 0000000..4d9000a
--- /dev/null
+++ b/libc/arch-mips64/syscalls/munlock.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl munlock
+ .align 4
+ .ent munlock
+
+munlock:
+ .set push
+ .set noreorder
+ li v0, __NR_munlock
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end munlock
diff --git a/libc/arch-mips64/syscalls/munlockall.S b/libc/arch-mips64/syscalls/munlockall.S
new file mode 100644
index 0000000..f8a1ff4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/munlockall.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl munlockall
+ .align 4
+ .ent munlockall
+
+munlockall:
+ .set push
+ .set noreorder
+ li v0, __NR_munlockall
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end munlockall
diff --git a/libc/arch-mips64/syscalls/munmap.S b/libc/arch-mips64/syscalls/munmap.S
new file mode 100644
index 0000000..a7e65a7
--- /dev/null
+++ b/libc/arch-mips64/syscalls/munmap.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl munmap
+ .align 4
+ .ent munmap
+
+munmap:
+ .set push
+ .set noreorder
+ li v0, __NR_munmap
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end munmap
diff --git a/libc/arch-mips64/syscalls/nanosleep.S b/libc/arch-mips64/syscalls/nanosleep.S
new file mode 100644
index 0000000..a3838de
--- /dev/null
+++ b/libc/arch-mips64/syscalls/nanosleep.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl nanosleep
+ .align 4
+ .ent nanosleep
+
+nanosleep:
+ .set push
+ .set noreorder
+ li v0, __NR_nanosleep
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end nanosleep
diff --git a/libc/arch-mips64/syscalls/perf_event_open.S b/libc/arch-mips64/syscalls/perf_event_open.S
new file mode 100644
index 0000000..14465fb
--- /dev/null
+++ b/libc/arch-mips64/syscalls/perf_event_open.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl perf_event_open
+ .align 4
+ .ent perf_event_open
+
+perf_event_open:
+ .set push
+ .set noreorder
+ li v0, __NR_perf_event_open
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end perf_event_open
diff --git a/libc/arch-mips64/syscalls/personality.S b/libc/arch-mips64/syscalls/personality.S
new file mode 100644
index 0000000..af39ee6
--- /dev/null
+++ b/libc/arch-mips64/syscalls/personality.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl personality
+ .align 4
+ .ent personality
+
+personality:
+ .set push
+ .set noreorder
+ li v0, __NR_personality
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end personality
diff --git a/libc/arch-mips64/syscalls/pipe2.S b/libc/arch-mips64/syscalls/pipe2.S
new file mode 100644
index 0000000..4e06258
--- /dev/null
+++ b/libc/arch-mips64/syscalls/pipe2.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl pipe2
+ .align 4
+ .ent pipe2
+
+pipe2:
+ .set push
+ .set noreorder
+ li v0, __NR_pipe2
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end pipe2
diff --git a/libc/arch-mips64/syscalls/prctl.S b/libc/arch-mips64/syscalls/prctl.S
new file mode 100644
index 0000000..122a28e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/prctl.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl prctl
+ .align 4
+ .ent prctl
+
+prctl:
+ .set push
+ .set noreorder
+ li v0, __NR_prctl
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end prctl
diff --git a/libc/arch-mips64/syscalls/pread64.S b/libc/arch-mips64/syscalls/pread64.S
new file mode 100644
index 0000000..b752147
--- /dev/null
+++ b/libc/arch-mips64/syscalls/pread64.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl pread64
+ .align 4
+ .ent pread64
+
+pread64:
+ .set push
+ .set noreorder
+ li v0, __NR_pread64
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end pread64
+
+ .globl _C_LABEL(pread)
+ .equ _C_LABEL(pread), _C_LABEL(pread64)
diff --git a/libc/arch-mips64/syscalls/prlimit64.S b/libc/arch-mips64/syscalls/prlimit64.S
new file mode 100644
index 0000000..dea308f
--- /dev/null
+++ b/libc/arch-mips64/syscalls/prlimit64.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl prlimit64
+ .align 4
+ .ent prlimit64
+
+prlimit64:
+ .set push
+ .set noreorder
+ li v0, __NR_prlimit64
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end prlimit64
+
+ .globl _C_LABEL(prlimit)
+ .equ _C_LABEL(prlimit), _C_LABEL(prlimit64)
diff --git a/libc/arch-mips64/syscalls/pwrite64.S b/libc/arch-mips64/syscalls/pwrite64.S
new file mode 100644
index 0000000..b168ddf
--- /dev/null
+++ b/libc/arch-mips64/syscalls/pwrite64.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl pwrite64
+ .align 4
+ .ent pwrite64
+
+pwrite64:
+ .set push
+ .set noreorder
+ li v0, __NR_pwrite64
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end pwrite64
+
+ .globl _C_LABEL(pwrite)
+ .equ _C_LABEL(pwrite), _C_LABEL(pwrite64)
diff --git a/libc/arch-mips64/syscalls/read.S b/libc/arch-mips64/syscalls/read.S
new file mode 100644
index 0000000..4d8c51d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/read.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl read
+ .align 4
+ .ent read
+
+read:
+ .set push
+ .set noreorder
+ li v0, __NR_read
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end read
diff --git a/libc/arch-mips64/syscalls/readahead.S b/libc/arch-mips64/syscalls/readahead.S
new file mode 100644
index 0000000..5ab1dcb
--- /dev/null
+++ b/libc/arch-mips64/syscalls/readahead.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl readahead
+ .align 4
+ .ent readahead
+
+readahead:
+ .set push
+ .set noreorder
+ li v0, __NR_readahead
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end readahead
diff --git a/libc/arch-mips64/syscalls/readlinkat.S b/libc/arch-mips64/syscalls/readlinkat.S
new file mode 100644
index 0000000..8e91dcf
--- /dev/null
+++ b/libc/arch-mips64/syscalls/readlinkat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl readlinkat
+ .align 4
+ .ent readlinkat
+
+readlinkat:
+ .set push
+ .set noreorder
+ li v0, __NR_readlinkat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end readlinkat
diff --git a/libc/arch-mips64/syscalls/readv.S b/libc/arch-mips64/syscalls/readv.S
new file mode 100644
index 0000000..e248942
--- /dev/null
+++ b/libc/arch-mips64/syscalls/readv.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl readv
+ .align 4
+ .ent readv
+
+readv:
+ .set push
+ .set noreorder
+ li v0, __NR_readv
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end readv
diff --git a/libc/arch-mips64/syscalls/recvfrom.S b/libc/arch-mips64/syscalls/recvfrom.S
new file mode 100644
index 0000000..818dc8e
--- /dev/null
+++ b/libc/arch-mips64/syscalls/recvfrom.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl recvfrom
+ .align 4
+ .ent recvfrom
+
+recvfrom:
+ .set push
+ .set noreorder
+ li v0, __NR_recvfrom
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end recvfrom
diff --git a/libc/arch-mips64/syscalls/recvmsg.S b/libc/arch-mips64/syscalls/recvmsg.S
new file mode 100644
index 0000000..06d8826
--- /dev/null
+++ b/libc/arch-mips64/syscalls/recvmsg.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl recvmsg
+ .align 4
+ .ent recvmsg
+
+recvmsg:
+ .set push
+ .set noreorder
+ li v0, __NR_recvmsg
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end recvmsg
diff --git a/libc/arch-mips64/syscalls/removexattr.S b/libc/arch-mips64/syscalls/removexattr.S
new file mode 100644
index 0000000..8b0d056
--- /dev/null
+++ b/libc/arch-mips64/syscalls/removexattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl removexattr
+ .align 4
+ .ent removexattr
+
+removexattr:
+ .set push
+ .set noreorder
+ li v0, __NR_removexattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end removexattr
diff --git a/libc/arch-mips64/syscalls/renameat.S b/libc/arch-mips64/syscalls/renameat.S
new file mode 100644
index 0000000..fdf24db
--- /dev/null
+++ b/libc/arch-mips64/syscalls/renameat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl renameat
+ .align 4
+ .ent renameat
+
+renameat:
+ .set push
+ .set noreorder
+ li v0, __NR_renameat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end renameat
diff --git a/libc/arch-mips64/syscalls/sched_get_priority_max.S b/libc/arch-mips64/syscalls/sched_get_priority_max.S
new file mode 100644
index 0000000..c84ab98
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_get_priority_max.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_get_priority_max
+ .align 4
+ .ent sched_get_priority_max
+
+sched_get_priority_max:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_get_priority_max
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_get_priority_max
diff --git a/libc/arch-mips64/syscalls/sched_get_priority_min.S b/libc/arch-mips64/syscalls/sched_get_priority_min.S
new file mode 100644
index 0000000..d9ab4ec
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_get_priority_min.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_get_priority_min
+ .align 4
+ .ent sched_get_priority_min
+
+sched_get_priority_min:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_get_priority_min
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_get_priority_min
diff --git a/libc/arch-mips64/syscalls/sched_getparam.S b/libc/arch-mips64/syscalls/sched_getparam.S
new file mode 100644
index 0000000..9f40fe4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_getparam.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_getparam
+ .align 4
+ .ent sched_getparam
+
+sched_getparam:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_getparam
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_getparam
diff --git a/libc/arch-mips64/syscalls/sched_getscheduler.S b/libc/arch-mips64/syscalls/sched_getscheduler.S
new file mode 100644
index 0000000..e263f61
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_getscheduler.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_getscheduler
+ .align 4
+ .ent sched_getscheduler
+
+sched_getscheduler:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_getscheduler
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_getscheduler
diff --git a/libc/arch-mips64/syscalls/sched_rr_get_interval.S b/libc/arch-mips64/syscalls/sched_rr_get_interval.S
new file mode 100644
index 0000000..a3bba28
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_rr_get_interval.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_rr_get_interval
+ .align 4
+ .ent sched_rr_get_interval
+
+sched_rr_get_interval:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_rr_get_interval
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_rr_get_interval
diff --git a/libc/arch-mips64/syscalls/sched_setaffinity.S b/libc/arch-mips64/syscalls/sched_setaffinity.S
new file mode 100644
index 0000000..35bfb30
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_setaffinity.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_setaffinity
+ .align 4
+ .ent sched_setaffinity
+
+sched_setaffinity:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_setaffinity
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_setaffinity
diff --git a/libc/arch-mips64/syscalls/sched_setparam.S b/libc/arch-mips64/syscalls/sched_setparam.S
new file mode 100644
index 0000000..714fcc9
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_setparam.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_setparam
+ .align 4
+ .ent sched_setparam
+
+sched_setparam:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_setparam
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_setparam
diff --git a/libc/arch-mips64/syscalls/sched_setscheduler.S b/libc/arch-mips64/syscalls/sched_setscheduler.S
new file mode 100644
index 0000000..4fe5783
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_setscheduler.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_setscheduler
+ .align 4
+ .ent sched_setscheduler
+
+sched_setscheduler:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_setscheduler
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_setscheduler
diff --git a/libc/arch-mips64/syscalls/sched_yield.S b/libc/arch-mips64/syscalls/sched_yield.S
new file mode 100644
index 0000000..b2542a3
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sched_yield.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sched_yield
+ .align 4
+ .ent sched_yield
+
+sched_yield:
+ .set push
+ .set noreorder
+ li v0, __NR_sched_yield
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sched_yield
diff --git a/libc/arch-mips64/syscalls/sendfile.S b/libc/arch-mips64/syscalls/sendfile.S
new file mode 100644
index 0000000..1876239
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sendfile.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sendfile
+ .align 4
+ .ent sendfile
+
+sendfile:
+ .set push
+ .set noreorder
+ li v0, __NR_sendfile
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sendfile
+
+ .globl _C_LABEL(sendfile64)
+ .equ _C_LABEL(sendfile64), _C_LABEL(sendfile)
diff --git a/libc/arch-mips64/syscalls/sendmsg.S b/libc/arch-mips64/syscalls/sendmsg.S
new file mode 100644
index 0000000..72227f7
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sendmsg.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sendmsg
+ .align 4
+ .ent sendmsg
+
+sendmsg:
+ .set push
+ .set noreorder
+ li v0, __NR_sendmsg
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sendmsg
diff --git a/libc/arch-mips64/syscalls/sendto.S b/libc/arch-mips64/syscalls/sendto.S
new file mode 100644
index 0000000..dbb4c56
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sendto.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sendto
+ .align 4
+ .ent sendto
+
+sendto:
+ .set push
+ .set noreorder
+ li v0, __NR_sendto
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sendto
diff --git a/libc/arch-mips64/syscalls/setgid.S b/libc/arch-mips64/syscalls/setgid.S
new file mode 100644
index 0000000..3d9b5d4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setgid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setgid
+ .align 4
+ .ent setgid
+
+setgid:
+ .set push
+ .set noreorder
+ li v0, __NR_setgid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setgid
diff --git a/libc/arch-mips64/syscalls/setgroups.S b/libc/arch-mips64/syscalls/setgroups.S
new file mode 100644
index 0000000..c4dc713
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setgroups.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setgroups
+ .align 4
+ .ent setgroups
+
+setgroups:
+ .set push
+ .set noreorder
+ li v0, __NR_setgroups
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setgroups
diff --git a/libc/arch-mips64/syscalls/setitimer.S b/libc/arch-mips64/syscalls/setitimer.S
new file mode 100644
index 0000000..b1969d0
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setitimer.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setitimer
+ .align 4
+ .ent setitimer
+
+setitimer:
+ .set push
+ .set noreorder
+ li v0, __NR_setitimer
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setitimer
diff --git a/libc/arch-mips64/syscalls/setns.S b/libc/arch-mips64/syscalls/setns.S
new file mode 100644
index 0000000..3073aad
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setns.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setns
+ .align 4
+ .ent setns
+
+setns:
+ .set push
+ .set noreorder
+ li v0, __NR_setns
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setns
diff --git a/libc/arch-mips64/syscalls/setpgid.S b/libc/arch-mips64/syscalls/setpgid.S
new file mode 100644
index 0000000..171ed17
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setpgid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setpgid
+ .align 4
+ .ent setpgid
+
+setpgid:
+ .set push
+ .set noreorder
+ li v0, __NR_setpgid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setpgid
diff --git a/libc/arch-mips64/syscalls/setpriority.S b/libc/arch-mips64/syscalls/setpriority.S
new file mode 100644
index 0000000..a73c155
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setpriority.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setpriority
+ .align 4
+ .ent setpriority
+
+setpriority:
+ .set push
+ .set noreorder
+ li v0, __NR_setpriority
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setpriority
diff --git a/libc/arch-mips64/syscalls/setregid.S b/libc/arch-mips64/syscalls/setregid.S
new file mode 100644
index 0000000..14217ba
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setregid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setregid
+ .align 4
+ .ent setregid
+
+setregid:
+ .set push
+ .set noreorder
+ li v0, __NR_setregid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setregid
diff --git a/libc/arch-mips64/syscalls/setresgid.S b/libc/arch-mips64/syscalls/setresgid.S
new file mode 100644
index 0000000..9e35dde
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setresgid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setresgid
+ .align 4
+ .ent setresgid
+
+setresgid:
+ .set push
+ .set noreorder
+ li v0, __NR_setresgid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setresgid
diff --git a/libc/arch-mips64/syscalls/setresuid.S b/libc/arch-mips64/syscalls/setresuid.S
new file mode 100644
index 0000000..fdd28a9
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setresuid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setresuid
+ .align 4
+ .ent setresuid
+
+setresuid:
+ .set push
+ .set noreorder
+ li v0, __NR_setresuid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setresuid
diff --git a/libc/arch-mips64/syscalls/setreuid.S b/libc/arch-mips64/syscalls/setreuid.S
new file mode 100644
index 0000000..db50c6c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setreuid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setreuid
+ .align 4
+ .ent setreuid
+
+setreuid:
+ .set push
+ .set noreorder
+ li v0, __NR_setreuid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setreuid
diff --git a/libc/arch-mips64/syscalls/setrlimit.S b/libc/arch-mips64/syscalls/setrlimit.S
new file mode 100644
index 0000000..e512c1d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setrlimit.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setrlimit
+ .align 4
+ .ent setrlimit
+
+setrlimit:
+ .set push
+ .set noreorder
+ li v0, __NR_setrlimit
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setrlimit
+
+ .globl _C_LABEL(setrlimit64)
+ .equ _C_LABEL(setrlimit64), _C_LABEL(setrlimit)
diff --git a/libc/arch-mips64/syscalls/setsid.S b/libc/arch-mips64/syscalls/setsid.S
new file mode 100644
index 0000000..b1b340f
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setsid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setsid
+ .align 4
+ .ent setsid
+
+setsid:
+ .set push
+ .set noreorder
+ li v0, __NR_setsid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setsid
diff --git a/libc/arch-mips64/syscalls/setsockopt.S b/libc/arch-mips64/syscalls/setsockopt.S
new file mode 100644
index 0000000..55cce5f
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setsockopt.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setsockopt
+ .align 4
+ .ent setsockopt
+
+setsockopt:
+ .set push
+ .set noreorder
+ li v0, __NR_setsockopt
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setsockopt
diff --git a/libc/arch-mips64/syscalls/settimeofday.S b/libc/arch-mips64/syscalls/settimeofday.S
new file mode 100644
index 0000000..72802e2
--- /dev/null
+++ b/libc/arch-mips64/syscalls/settimeofday.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl settimeofday
+ .align 4
+ .ent settimeofday
+
+settimeofday:
+ .set push
+ .set noreorder
+ li v0, __NR_settimeofday
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end settimeofday
diff --git a/libc/arch-mips64/syscalls/setuid.S b/libc/arch-mips64/syscalls/setuid.S
new file mode 100644
index 0000000..d8edd22
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setuid.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setuid
+ .align 4
+ .ent setuid
+
+setuid:
+ .set push
+ .set noreorder
+ li v0, __NR_setuid
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setuid
diff --git a/libc/arch-mips64/syscalls/setxattr.S b/libc/arch-mips64/syscalls/setxattr.S
new file mode 100644
index 0000000..9ccc378
--- /dev/null
+++ b/libc/arch-mips64/syscalls/setxattr.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl setxattr
+ .align 4
+ .ent setxattr
+
+setxattr:
+ .set push
+ .set noreorder
+ li v0, __NR_setxattr
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end setxattr
diff --git a/libc/arch-mips64/syscalls/shutdown.S b/libc/arch-mips64/syscalls/shutdown.S
new file mode 100644
index 0000000..335ed41
--- /dev/null
+++ b/libc/arch-mips64/syscalls/shutdown.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl shutdown
+ .align 4
+ .ent shutdown
+
+shutdown:
+ .set push
+ .set noreorder
+ li v0, __NR_shutdown
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end shutdown
diff --git a/libc/arch-mips64/syscalls/sigaltstack.S b/libc/arch-mips64/syscalls/sigaltstack.S
new file mode 100644
index 0000000..3458b11
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sigaltstack.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sigaltstack
+ .align 4
+ .ent sigaltstack
+
+sigaltstack:
+ .set push
+ .set noreorder
+ li v0, __NR_sigaltstack
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sigaltstack
diff --git a/libc/arch-mips64/syscalls/signalfd4.S b/libc/arch-mips64/syscalls/signalfd4.S
new file mode 100644
index 0000000..ef1d1e5
--- /dev/null
+++ b/libc/arch-mips64/syscalls/signalfd4.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl signalfd4
+ .align 4
+ .ent signalfd4
+
+signalfd4:
+ .set push
+ .set noreorder
+ li v0, __NR_signalfd4
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end signalfd4
diff --git a/libc/arch-mips64/syscalls/socket.S b/libc/arch-mips64/syscalls/socket.S
new file mode 100644
index 0000000..6b042c2
--- /dev/null
+++ b/libc/arch-mips64/syscalls/socket.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl socket
+ .align 4
+ .ent socket
+
+socket:
+ .set push
+ .set noreorder
+ li v0, __NR_socket
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end socket
diff --git a/libc/arch-mips64/syscalls/socketpair.S b/libc/arch-mips64/syscalls/socketpair.S
new file mode 100644
index 0000000..b4ca8f4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/socketpair.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl socketpair
+ .align 4
+ .ent socketpair
+
+socketpair:
+ .set push
+ .set noreorder
+ li v0, __NR_socketpair
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end socketpair
diff --git a/libc/arch-mips64/syscalls/statfs.S b/libc/arch-mips64/syscalls/statfs.S
new file mode 100644
index 0000000..4711b1a
--- /dev/null
+++ b/libc/arch-mips64/syscalls/statfs.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl statfs
+ .align 4
+ .ent statfs
+
+statfs:
+ .set push
+ .set noreorder
+ li v0, __NR_statfs
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end statfs
diff --git a/libc/arch-mips64/syscalls/swapoff.S b/libc/arch-mips64/syscalls/swapoff.S
new file mode 100644
index 0000000..8041188
--- /dev/null
+++ b/libc/arch-mips64/syscalls/swapoff.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl swapoff
+ .align 4
+ .ent swapoff
+
+swapoff:
+ .set push
+ .set noreorder
+ li v0, __NR_swapoff
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end swapoff
diff --git a/libc/arch-mips64/syscalls/swapon.S b/libc/arch-mips64/syscalls/swapon.S
new file mode 100644
index 0000000..5c24d7c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/swapon.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl swapon
+ .align 4
+ .ent swapon
+
+swapon:
+ .set push
+ .set noreorder
+ li v0, __NR_swapon
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end swapon
diff --git a/libc/arch-mips64/syscalls/symlinkat.S b/libc/arch-mips64/syscalls/symlinkat.S
new file mode 100644
index 0000000..ce86d86
--- /dev/null
+++ b/libc/arch-mips64/syscalls/symlinkat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl symlinkat
+ .align 4
+ .ent symlinkat
+
+symlinkat:
+ .set push
+ .set noreorder
+ li v0, __NR_symlinkat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end symlinkat
diff --git a/libc/arch-mips64/syscalls/sync.S b/libc/arch-mips64/syscalls/sync.S
new file mode 100644
index 0000000..e0787bd
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sync.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sync
+ .align 4
+ .ent sync
+
+sync:
+ .set push
+ .set noreorder
+ li v0, __NR_sync
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sync
diff --git a/libc/arch-mips64/syscalls/sysinfo.S b/libc/arch-mips64/syscalls/sysinfo.S
new file mode 100644
index 0000000..19ad141
--- /dev/null
+++ b/libc/arch-mips64/syscalls/sysinfo.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl sysinfo
+ .align 4
+ .ent sysinfo
+
+sysinfo:
+ .set push
+ .set noreorder
+ li v0, __NR_sysinfo
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end sysinfo
diff --git a/libc/arch-mips64/syscalls/tgkill.S b/libc/arch-mips64/syscalls/tgkill.S
new file mode 100644
index 0000000..1a8fe79
--- /dev/null
+++ b/libc/arch-mips64/syscalls/tgkill.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl tgkill
+ .align 4
+ .ent tgkill
+
+tgkill:
+ .set push
+ .set noreorder
+ li v0, __NR_tgkill
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end tgkill
diff --git a/libc/arch-mips64/syscalls/timerfd_create.S b/libc/arch-mips64/syscalls/timerfd_create.S
new file mode 100644
index 0000000..63e8b00
--- /dev/null
+++ b/libc/arch-mips64/syscalls/timerfd_create.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl timerfd_create
+ .align 4
+ .ent timerfd_create
+
+timerfd_create:
+ .set push
+ .set noreorder
+ li v0, __NR_timerfd_create
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end timerfd_create
diff --git a/libc/arch-mips64/syscalls/timerfd_gettime.S b/libc/arch-mips64/syscalls/timerfd_gettime.S
new file mode 100644
index 0000000..2afe6f1
--- /dev/null
+++ b/libc/arch-mips64/syscalls/timerfd_gettime.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl timerfd_gettime
+ .align 4
+ .ent timerfd_gettime
+
+timerfd_gettime:
+ .set push
+ .set noreorder
+ li v0, __NR_timerfd_gettime
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end timerfd_gettime
diff --git a/libc/arch-mips64/syscalls/timerfd_settime.S b/libc/arch-mips64/syscalls/timerfd_settime.S
new file mode 100644
index 0000000..40ce07d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/timerfd_settime.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl timerfd_settime
+ .align 4
+ .ent timerfd_settime
+
+timerfd_settime:
+ .set push
+ .set noreorder
+ li v0, __NR_timerfd_settime
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end timerfd_settime
diff --git a/libc/arch-mips64/syscalls/times.S b/libc/arch-mips64/syscalls/times.S
new file mode 100644
index 0000000..ccbdbf4
--- /dev/null
+++ b/libc/arch-mips64/syscalls/times.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl times
+ .align 4
+ .ent times
+
+times:
+ .set push
+ .set noreorder
+ li v0, __NR_times
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end times
diff --git a/libc/arch-mips64/syscalls/tkill.S b/libc/arch-mips64/syscalls/tkill.S
new file mode 100644
index 0000000..8caa695
--- /dev/null
+++ b/libc/arch-mips64/syscalls/tkill.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl tkill
+ .align 4
+ .ent tkill
+
+tkill:
+ .set push
+ .set noreorder
+ li v0, __NR_tkill
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end tkill
diff --git a/libc/arch-mips64/syscalls/truncate.S b/libc/arch-mips64/syscalls/truncate.S
new file mode 100644
index 0000000..b68f35c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/truncate.S
@@ -0,0 +1,34 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl truncate
+ .align 4
+ .ent truncate
+
+truncate:
+ .set push
+ .set noreorder
+ li v0, __NR_truncate
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end truncate
+
+ .globl _C_LABEL(truncate64)
+ .equ _C_LABEL(truncate64), _C_LABEL(truncate)
diff --git a/libc/arch-mips64/syscalls/umask.S b/libc/arch-mips64/syscalls/umask.S
new file mode 100644
index 0000000..168ff9c
--- /dev/null
+++ b/libc/arch-mips64/syscalls/umask.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl umask
+ .align 4
+ .ent umask
+
+umask:
+ .set push
+ .set noreorder
+ li v0, __NR_umask
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end umask
diff --git a/libc/arch-mips64/syscalls/umount2.S b/libc/arch-mips64/syscalls/umount2.S
new file mode 100644
index 0000000..db80fa8
--- /dev/null
+++ b/libc/arch-mips64/syscalls/umount2.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl umount2
+ .align 4
+ .ent umount2
+
+umount2:
+ .set push
+ .set noreorder
+ li v0, __NR_umount2
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end umount2
diff --git a/libc/arch-mips64/syscalls/uname.S b/libc/arch-mips64/syscalls/uname.S
new file mode 100644
index 0000000..417ecb0
--- /dev/null
+++ b/libc/arch-mips64/syscalls/uname.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl uname
+ .align 4
+ .ent uname
+
+uname:
+ .set push
+ .set noreorder
+ li v0, __NR_uname
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end uname
diff --git a/libc/arch-mips64/syscalls/unlinkat.S b/libc/arch-mips64/syscalls/unlinkat.S
new file mode 100644
index 0000000..e533bc3
--- /dev/null
+++ b/libc/arch-mips64/syscalls/unlinkat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl unlinkat
+ .align 4
+ .ent unlinkat
+
+unlinkat:
+ .set push
+ .set noreorder
+ li v0, __NR_unlinkat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end unlinkat
diff --git a/libc/arch-mips64/syscalls/unshare.S b/libc/arch-mips64/syscalls/unshare.S
new file mode 100644
index 0000000..4a19745
--- /dev/null
+++ b/libc/arch-mips64/syscalls/unshare.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl unshare
+ .align 4
+ .ent unshare
+
+unshare:
+ .set push
+ .set noreorder
+ li v0, __NR_unshare
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end unshare
diff --git a/libc/arch-mips64/syscalls/utimensat.S b/libc/arch-mips64/syscalls/utimensat.S
new file mode 100644
index 0000000..1cde60d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/utimensat.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl utimensat
+ .align 4
+ .ent utimensat
+
+utimensat:
+ .set push
+ .set noreorder
+ li v0, __NR_utimensat
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end utimensat
diff --git a/libc/arch-mips64/syscalls/wait4.S b/libc/arch-mips64/syscalls/wait4.S
new file mode 100644
index 0000000..14abeeb
--- /dev/null
+++ b/libc/arch-mips64/syscalls/wait4.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl wait4
+ .align 4
+ .ent wait4
+
+wait4:
+ .set push
+ .set noreorder
+ li v0, __NR_wait4
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end wait4
diff --git a/libc/arch-mips64/syscalls/write.S b/libc/arch-mips64/syscalls/write.S
new file mode 100644
index 0000000..f58f25d
--- /dev/null
+++ b/libc/arch-mips64/syscalls/write.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl write
+ .align 4
+ .ent write
+
+write:
+ .set push
+ .set noreorder
+ li v0, __NR_write
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end write
diff --git a/libc/arch-mips64/syscalls/writev.S b/libc/arch-mips64/syscalls/writev.S
new file mode 100644
index 0000000..a716c78
--- /dev/null
+++ b/libc/arch-mips64/syscalls/writev.S
@@ -0,0 +1,31 @@
+/* Generated by gensyscalls.py. Do not edit. */
+
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl writev
+ .align 4
+ .ent writev
+
+writev:
+ .set push
+ .set noreorder
+ li v0, __NR_writev
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end writev
diff --git a/libc/tools/bionic_utils.py b/libc/tools/bionic_utils.py
index 88ddd55..def04a6 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", "arm64", "mips", "x86", "x86_64" ]
+all_arches = [ "arm", "arm64", "mips", "mips64", "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 cea3508..54b8dbc 100755
--- a/libc/tools/gensyscalls.py
+++ b/libc/tools/gensyscalls.py
@@ -145,6 +145,44 @@ mips_call = "/* " + warning + " */\n" + \
#
+# MIPS64 assembler templates for each syscall stub
+#
+
+mips64_call = "/* " + warning + " */\n" + \
+"""
+#include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
+ .text
+ .globl %(func)s
+ .align 4
+ .ent %(func)s
+
+%(func)s:
+ .set push
+ .set noreorder
+ li v0, %(__NR_name)s
+ syscall
+ bnez a3, 1f
+ move a0, v0
+ j ra
+ nop
+1:
+ move t0, ra
+ bal 2f
+ nop
+2:
+ .cpsetup ra, t1, 2b
+ LA t9,__set_errno
+ .cpreturn
+ j t9
+ move ra, t0
+ .set pop
+ .end %(func)s
+"""
+
+
+#
# x86 assembler templates for each syscall stub
#
@@ -288,6 +326,10 @@ def mips_genstub(syscall):
return mips_call % syscall
+def mips64_genstub(syscall):
+ return mips64_call % syscall
+
+
def x86_genstub(syscall):
result = syscall_stub_header % syscall
@@ -396,6 +438,9 @@ class State:
if syscall.has_key("mips"):
syscall["asm-mips"] = add_footer(32, mips_genstub(syscall), syscall)
+ if syscall.has_key("mips64"):
+ syscall["asm-mips64"] = add_footer(64, mips64_genstub(syscall), syscall)
+
if syscall.has_key("x86_64"):
syscall["asm-x86_64"] = add_footer(64, x86_64_genstub(syscall), syscall)