From eae27dc55adca75c2332e4b767ec667acfbbbcb3 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <enh@google.com>
Date: Wed, 19 Feb 2014 12:20:00 -0800
Subject: [PATCH] Make mips generated assembler more like the mips64 stuff.

I broke the mips build yesterday because it doesn't use
<private/bionic_asm.h> like the other architectures, including mips64.
I want to move mips closer to mips64 to try to avoid this kind of thing
in future.

Change-Id: Idb985587ff355b9e5e765c1f5671dc0144cd2488
---
 libc/arch-mips/syscalls/__brk.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/__epoll_pwait.S          | 16 +++++++++-------
 libc/arch-mips/syscalls/__exit.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/__fcntl64.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/__fstatfs64.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/__getcpu.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/__getcwd.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/__getpriority.S          | 16 +++++++++-------
 libc/arch-mips/syscalls/__ioctl.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/__llseek.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/__mmap2.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/__openat.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/__ppoll.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/__pselect6.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/__ptrace.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/__reboot.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/__rt_sigaction.S         | 16 +++++++++-------
 libc/arch-mips/syscalls/__rt_sigpending.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/__rt_sigprocmask.S       | 16 +++++++++-------
 libc/arch-mips/syscalls/__rt_sigsuspend.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/__rt_sigtimedwait.S      | 16 +++++++++-------
 libc/arch-mips/syscalls/__sched_getaffinity.S    | 16 +++++++++-------
 libc/arch-mips/syscalls/__set_thread_area.S      | 16 +++++++++-------
 libc/arch-mips/syscalls/__set_tid_address.S      | 16 +++++++++-------
 libc/arch-mips/syscalls/__sigaction.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/__statfs64.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/__syslog.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/__timer_create.S         | 16 +++++++++-------
 libc/arch-mips/syscalls/__timer_delete.S         | 16 +++++++++-------
 libc/arch-mips/syscalls/__timer_getoverrun.S     | 16 +++++++++-------
 libc/arch-mips/syscalls/__timer_gettime.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/__timer_settime.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/__waitid.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/_exit.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/_flush_cache.S           | 16 +++++++++-------
 libc/arch-mips/syscalls/accept.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/acct.S                   | 16 +++++++++-------
 libc/arch-mips/syscalls/bind.S                   | 16 +++++++++-------
 libc/arch-mips/syscalls/capget.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/capset.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/chdir.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/chroot.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/clock_getres.S           | 16 +++++++++-------
 libc/arch-mips/syscalls/clock_gettime.S          | 16 +++++++++-------
 libc/arch-mips/syscalls/clock_nanosleep.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/clock_settime.S          | 16 +++++++++-------
 libc/arch-mips/syscalls/close.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/connect.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/delete_module.S          | 16 +++++++++-------
 libc/arch-mips/syscalls/dup.S                    | 16 +++++++++-------
 libc/arch-mips/syscalls/dup3.S                   | 16 +++++++++-------
 libc/arch-mips/syscalls/epoll_create1.S          | 16 +++++++++-------
 libc/arch-mips/syscalls/epoll_ctl.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/eventfd.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/execve.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/faccessat.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/fallocate64.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/fchdir.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/fchmod.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/fchmodat.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/fchown.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/fchownat.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/fdatasync.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/fgetxattr.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/flistxattr.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/flock.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/fremovexattr.S           | 16 +++++++++-------
 libc/arch-mips/syscalls/fsetxattr.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/fstat64.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/fstatat64.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/fsync.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/ftruncate.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/ftruncate64.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/futex.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/getdents.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/getegid.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/geteuid.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/getgid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/getgroups.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/getitimer.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/getpeername.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/getpgid.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/getpid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/getppid.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/getresgid.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/getresuid.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/getrlimit.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/getrusage.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/getsid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/getsockname.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/getsockopt.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/gettid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/gettimeofday.S           | 16 +++++++++-------
 libc/arch-mips/syscalls/getuid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/getxattr.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/init_module.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/inotify_add_watch.S      | 16 +++++++++-------
 libc/arch-mips/syscalls/inotify_init1.S          | 16 +++++++++-------
 libc/arch-mips/syscalls/inotify_rm_watch.S       | 16 +++++++++-------
 libc/arch-mips/syscalls/ioprio_get.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/ioprio_set.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/kill.S                   | 16 +++++++++-------
 libc/arch-mips/syscalls/klogctl.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/lgetxattr.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/linkat.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/listen.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/listxattr.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/llistxattr.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/lremovexattr.S           | 16 +++++++++-------
 libc/arch-mips/syscalls/lseek.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/lsetxattr.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/madvise.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/mincore.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/mkdirat.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/mknodat.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/mlock.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/mlockall.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/mount.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/mprotect.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/mremap.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/msync.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/munlock.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/munlockall.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/munmap.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/nanosleep.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/perf_event_open.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/personality.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/pipe2.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/prctl.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/pread64.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/prlimit64.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/pwrite64.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/read.S                   | 16 +++++++++-------
 libc/arch-mips/syscalls/readahead.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/readlinkat.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/readv.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/recvfrom.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/recvmsg.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/removexattr.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/renameat.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_get_priority_max.S | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_get_priority_min.S | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_getparam.S         | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_getscheduler.S     | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_rr_get_interval.S  | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_setaffinity.S      | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_setparam.S         | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_setscheduler.S     | 16 +++++++++-------
 libc/arch-mips/syscalls/sched_yield.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/sendfile.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/sendfile64.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/sendmsg.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/sendto.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/setgid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/setgroups.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/setitimer.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/setns.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/setpgid.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/setpriority.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/setregid.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/setresgid.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/setresuid.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/setreuid.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/setrlimit.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/setsid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/setsockopt.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/settimeofday.S           | 16 +++++++++-------
 libc/arch-mips/syscalls/setuid.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/setxattr.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/shutdown.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/sigaltstack.S            | 16 +++++++++-------
 libc/arch-mips/syscalls/signalfd4.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/socket.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/socketpair.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/swapoff.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/swapon.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/symlinkat.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/sync.S                   | 16 +++++++++-------
 libc/arch-mips/syscalls/sysinfo.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/tgkill.S                 | 16 +++++++++-------
 libc/arch-mips/syscalls/timerfd_create.S         | 16 +++++++++-------
 libc/arch-mips/syscalls/timerfd_gettime.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/timerfd_settime.S        | 16 +++++++++-------
 libc/arch-mips/syscalls/times.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/tkill.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/truncate.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/truncate64.S             | 16 +++++++++-------
 libc/arch-mips/syscalls/umask.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/umount2.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/uname.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/unlinkat.S               | 16 +++++++++-------
 libc/arch-mips/syscalls/unshare.S                | 16 +++++++++-------
 libc/arch-mips/syscalls/utimensat.S              | 16 +++++++++-------
 libc/arch-mips/syscalls/wait4.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/write.S                  | 16 +++++++++-------
 libc/arch-mips/syscalls/writev.S                 | 16 +++++++++-------
 libc/tools/gensyscalls.py                        | 16 +++++++++-------
 197 files changed, 1773 insertions(+), 1379 deletions(-)

diff --git a/libc/arch-mips/syscalls/__brk.S b/libc/arch-mips/syscalls/__brk.S
index 87e13bd54..cfe549492 100644
--- a/libc/arch-mips/syscalls/__brk.S
+++ b/libc/arch-mips/syscalls/__brk.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __brk
     .align 4
@@ -8,16 +10,16 @@
 
 __brk:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_brk
+    .cpload t9
+    li v0, __NR_brk
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __brk
diff --git a/libc/arch-mips/syscalls/__epoll_pwait.S b/libc/arch-mips/syscalls/__epoll_pwait.S
index 0a5fdae1e..bff520ac2 100644
--- a/libc/arch-mips/syscalls/__epoll_pwait.S
+++ b/libc/arch-mips/syscalls/__epoll_pwait.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __epoll_pwait:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_epoll_pwait
+    .cpload t9
+    li v0, __NR_epoll_pwait
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __epoll_pwait
diff --git a/libc/arch-mips/syscalls/__exit.S b/libc/arch-mips/syscalls/__exit.S
index 529e49c0b..ca4e82004 100644
--- a/libc/arch-mips/syscalls/__exit.S
+++ b/libc/arch-mips/syscalls/__exit.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __exit
     .align 4
@@ -8,16 +10,16 @@
 
 __exit:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_exit
+    .cpload t9
+    li v0, __NR_exit
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __exit
diff --git a/libc/arch-mips/syscalls/__fcntl64.S b/libc/arch-mips/syscalls/__fcntl64.S
index 39ed4cf0d..33d893296 100644
--- a/libc/arch-mips/syscalls/__fcntl64.S
+++ b/libc/arch-mips/syscalls/__fcntl64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __fcntl64
     .align 4
@@ -8,16 +10,16 @@
 
 __fcntl64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fcntl64
+    .cpload t9
+    li v0, __NR_fcntl64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __fcntl64
diff --git a/libc/arch-mips/syscalls/__fstatfs64.S b/libc/arch-mips/syscalls/__fstatfs64.S
index 3389a8d32..9fd19bfa4 100644
--- a/libc/arch-mips/syscalls/__fstatfs64.S
+++ b/libc/arch-mips/syscalls/__fstatfs64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __fstatfs64
     .align 4
@@ -8,16 +10,16 @@
 
 __fstatfs64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fstatfs64
+    .cpload t9
+    li v0, __NR_fstatfs64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __fstatfs64
diff --git a/libc/arch-mips/syscalls/__getcpu.S b/libc/arch-mips/syscalls/__getcpu.S
index d29bd6250..042417ece 100644
--- a/libc/arch-mips/syscalls/__getcpu.S
+++ b/libc/arch-mips/syscalls/__getcpu.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __getcpu
     .align 4
@@ -8,16 +10,16 @@
 
 __getcpu:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getcpu
+    .cpload t9
+    li v0, __NR_getcpu
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __getcpu
diff --git a/libc/arch-mips/syscalls/__getcwd.S b/libc/arch-mips/syscalls/__getcwd.S
index ce05d92e2..ff805fed1 100644
--- a/libc/arch-mips/syscalls/__getcwd.S
+++ b/libc/arch-mips/syscalls/__getcwd.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __getcwd
     .align 4
@@ -8,16 +10,16 @@
 
 __getcwd:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getcwd
+    .cpload t9
+    li v0, __NR_getcwd
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __getcwd
diff --git a/libc/arch-mips/syscalls/__getpriority.S b/libc/arch-mips/syscalls/__getpriority.S
index 767b6d05b..1f7259eef 100644
--- a/libc/arch-mips/syscalls/__getpriority.S
+++ b/libc/arch-mips/syscalls/__getpriority.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __getpriority
     .align 4
@@ -8,16 +10,16 @@
 
 __getpriority:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getpriority
+    .cpload t9
+    li v0, __NR_getpriority
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __getpriority
diff --git a/libc/arch-mips/syscalls/__ioctl.S b/libc/arch-mips/syscalls/__ioctl.S
index 3d83c6092..883073370 100644
--- a/libc/arch-mips/syscalls/__ioctl.S
+++ b/libc/arch-mips/syscalls/__ioctl.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __ioctl
     .align 4
@@ -8,16 +10,16 @@
 
 __ioctl:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_ioctl
+    .cpload t9
+    li v0, __NR_ioctl
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __ioctl
diff --git a/libc/arch-mips/syscalls/__llseek.S b/libc/arch-mips/syscalls/__llseek.S
index 9a3753ba8..7128319e6 100644
--- a/libc/arch-mips/syscalls/__llseek.S
+++ b/libc/arch-mips/syscalls/__llseek.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __llseek
     .align 4
@@ -8,16 +10,16 @@
 
 __llseek:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR__llseek
+    .cpload t9
+    li v0, __NR__llseek
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __llseek
diff --git a/libc/arch-mips/syscalls/__mmap2.S b/libc/arch-mips/syscalls/__mmap2.S
index 723e80ef8..712c3113d 100644
--- a/libc/arch-mips/syscalls/__mmap2.S
+++ b/libc/arch-mips/syscalls/__mmap2.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __mmap2
     .align 4
@@ -8,16 +10,16 @@
 
 __mmap2:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mmap2
+    .cpload t9
+    li v0, __NR_mmap2
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __mmap2
diff --git a/libc/arch-mips/syscalls/__openat.S b/libc/arch-mips/syscalls/__openat.S
index e55e71d6a..f30002ccf 100644
--- a/libc/arch-mips/syscalls/__openat.S
+++ b/libc/arch-mips/syscalls/__openat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __openat
     .align 4
@@ -8,16 +10,16 @@
 
 __openat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_openat
+    .cpload t9
+    li v0, __NR_openat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __openat
diff --git a/libc/arch-mips/syscalls/__ppoll.S b/libc/arch-mips/syscalls/__ppoll.S
index ef6d34380..9c78d76ec 100644
--- a/libc/arch-mips/syscalls/__ppoll.S
+++ b/libc/arch-mips/syscalls/__ppoll.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __ppoll
     .align 4
@@ -8,16 +10,16 @@
 
 __ppoll:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_ppoll
+    .cpload t9
+    li v0, __NR_ppoll
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __ppoll
diff --git a/libc/arch-mips/syscalls/__pselect6.S b/libc/arch-mips/syscalls/__pselect6.S
index 26af92a10..235679b6f 100644
--- a/libc/arch-mips/syscalls/__pselect6.S
+++ b/libc/arch-mips/syscalls/__pselect6.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __pselect6
     .align 4
@@ -8,16 +10,16 @@
 
 __pselect6:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_pselect6
+    .cpload t9
+    li v0, __NR_pselect6
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __pselect6
diff --git a/libc/arch-mips/syscalls/__ptrace.S b/libc/arch-mips/syscalls/__ptrace.S
index f2ea8c79b..d79255886 100644
--- a/libc/arch-mips/syscalls/__ptrace.S
+++ b/libc/arch-mips/syscalls/__ptrace.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __ptrace
     .align 4
@@ -8,16 +10,16 @@
 
 __ptrace:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_ptrace
+    .cpload t9
+    li v0, __NR_ptrace
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __ptrace
diff --git a/libc/arch-mips/syscalls/__reboot.S b/libc/arch-mips/syscalls/__reboot.S
index 95ba5d889..e5be535ab 100644
--- a/libc/arch-mips/syscalls/__reboot.S
+++ b/libc/arch-mips/syscalls/__reboot.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __reboot
     .align 4
@@ -8,16 +10,16 @@
 
 __reboot:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_reboot
+    .cpload t9
+    li v0, __NR_reboot
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __reboot
diff --git a/libc/arch-mips/syscalls/__rt_sigaction.S b/libc/arch-mips/syscalls/__rt_sigaction.S
index 73253d612..35ec829af 100644
--- a/libc/arch-mips/syscalls/__rt_sigaction.S
+++ b/libc/arch-mips/syscalls/__rt_sigaction.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __rt_sigaction:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_rt_sigaction
+    .cpload t9
+    li v0, __NR_rt_sigaction
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __rt_sigaction
diff --git a/libc/arch-mips/syscalls/__rt_sigpending.S b/libc/arch-mips/syscalls/__rt_sigpending.S
index 90357b3f6..fb695f5f9 100644
--- a/libc/arch-mips/syscalls/__rt_sigpending.S
+++ b/libc/arch-mips/syscalls/__rt_sigpending.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __rt_sigpending:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_rt_sigpending
+    .cpload t9
+    li v0, __NR_rt_sigpending
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __rt_sigpending
diff --git a/libc/arch-mips/syscalls/__rt_sigprocmask.S b/libc/arch-mips/syscalls/__rt_sigprocmask.S
index 0d34e3775..674d6458c 100644
--- a/libc/arch-mips/syscalls/__rt_sigprocmask.S
+++ b/libc/arch-mips/syscalls/__rt_sigprocmask.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __rt_sigprocmask:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_rt_sigprocmask
+    .cpload t9
+    li v0, __NR_rt_sigprocmask
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __rt_sigprocmask
diff --git a/libc/arch-mips/syscalls/__rt_sigsuspend.S b/libc/arch-mips/syscalls/__rt_sigsuspend.S
index 3ff472347..15c709dab 100644
--- a/libc/arch-mips/syscalls/__rt_sigsuspend.S
+++ b/libc/arch-mips/syscalls/__rt_sigsuspend.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __rt_sigsuspend:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_rt_sigsuspend
+    .cpload t9
+    li v0, __NR_rt_sigsuspend
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __rt_sigsuspend
diff --git a/libc/arch-mips/syscalls/__rt_sigtimedwait.S b/libc/arch-mips/syscalls/__rt_sigtimedwait.S
index 19a5ce95a..d4f4a00e3 100644
--- a/libc/arch-mips/syscalls/__rt_sigtimedwait.S
+++ b/libc/arch-mips/syscalls/__rt_sigtimedwait.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __rt_sigtimedwait:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_rt_sigtimedwait
+    .cpload t9
+    li v0, __NR_rt_sigtimedwait
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __rt_sigtimedwait
diff --git a/libc/arch-mips/syscalls/__sched_getaffinity.S b/libc/arch-mips/syscalls/__sched_getaffinity.S
index 0038ff9d6..a5fdd6770 100644
--- a/libc/arch-mips/syscalls/__sched_getaffinity.S
+++ b/libc/arch-mips/syscalls/__sched_getaffinity.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __sched_getaffinity:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_getaffinity
+    .cpload t9
+    li v0, __NR_sched_getaffinity
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __sched_getaffinity
diff --git a/libc/arch-mips/syscalls/__set_thread_area.S b/libc/arch-mips/syscalls/__set_thread_area.S
index 69383e981..0e796c429 100644
--- a/libc/arch-mips/syscalls/__set_thread_area.S
+++ b/libc/arch-mips/syscalls/__set_thread_area.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __set_thread_area:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_set_thread_area
+    .cpload t9
+    li v0, __NR_set_thread_area
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __set_thread_area
diff --git a/libc/arch-mips/syscalls/__set_tid_address.S b/libc/arch-mips/syscalls/__set_tid_address.S
index 4fcc82a5e..27db9117a 100644
--- a/libc/arch-mips/syscalls/__set_tid_address.S
+++ b/libc/arch-mips/syscalls/__set_tid_address.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __set_tid_address:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_set_tid_address
+    .cpload t9
+    li v0, __NR_set_tid_address
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __set_tid_address
diff --git a/libc/arch-mips/syscalls/__sigaction.S b/libc/arch-mips/syscalls/__sigaction.S
index cc53ab417..aa9ead70a 100644
--- a/libc/arch-mips/syscalls/__sigaction.S
+++ b/libc/arch-mips/syscalls/__sigaction.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __sigaction
     .align 4
@@ -8,16 +10,16 @@
 
 __sigaction:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sigaction
+    .cpload t9
+    li v0, __NR_sigaction
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __sigaction
diff --git a/libc/arch-mips/syscalls/__statfs64.S b/libc/arch-mips/syscalls/__statfs64.S
index 4b3351c65..d6cc518bd 100644
--- a/libc/arch-mips/syscalls/__statfs64.S
+++ b/libc/arch-mips/syscalls/__statfs64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __statfs64
     .align 4
@@ -8,16 +10,16 @@
 
 __statfs64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_statfs64
+    .cpload t9
+    li v0, __NR_statfs64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __statfs64
diff --git a/libc/arch-mips/syscalls/__syslog.S b/libc/arch-mips/syscalls/__syslog.S
index 61a324231..2b71f1127 100644
--- a/libc/arch-mips/syscalls/__syslog.S
+++ b/libc/arch-mips/syscalls/__syslog.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __syslog
     .align 4
@@ -8,16 +10,16 @@
 
 __syslog:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_syslog
+    .cpload t9
+    li v0, __NR_syslog
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __syslog
diff --git a/libc/arch-mips/syscalls/__timer_create.S b/libc/arch-mips/syscalls/__timer_create.S
index 054c1b969..399590d4d 100644
--- a/libc/arch-mips/syscalls/__timer_create.S
+++ b/libc/arch-mips/syscalls/__timer_create.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __timer_create:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timer_create
+    .cpload t9
+    li v0, __NR_timer_create
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __timer_create
diff --git a/libc/arch-mips/syscalls/__timer_delete.S b/libc/arch-mips/syscalls/__timer_delete.S
index 2fa6e5018..47d3706f8 100644
--- a/libc/arch-mips/syscalls/__timer_delete.S
+++ b/libc/arch-mips/syscalls/__timer_delete.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __timer_delete:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timer_delete
+    .cpload t9
+    li v0, __NR_timer_delete
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __timer_delete
diff --git a/libc/arch-mips/syscalls/__timer_getoverrun.S b/libc/arch-mips/syscalls/__timer_getoverrun.S
index 269ac4d52..97ae20756 100644
--- a/libc/arch-mips/syscalls/__timer_getoverrun.S
+++ b/libc/arch-mips/syscalls/__timer_getoverrun.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __timer_getoverrun:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timer_getoverrun
+    .cpload t9
+    li v0, __NR_timer_getoverrun
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __timer_getoverrun
diff --git a/libc/arch-mips/syscalls/__timer_gettime.S b/libc/arch-mips/syscalls/__timer_gettime.S
index 3a18e3de0..45e05ae61 100644
--- a/libc/arch-mips/syscalls/__timer_gettime.S
+++ b/libc/arch-mips/syscalls/__timer_gettime.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __timer_gettime:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timer_gettime
+    .cpload t9
+    li v0, __NR_timer_gettime
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __timer_gettime
diff --git a/libc/arch-mips/syscalls/__timer_settime.S b/libc/arch-mips/syscalls/__timer_settime.S
index daf671f08..da13eacf5 100644
--- a/libc/arch-mips/syscalls/__timer_settime.S
+++ b/libc/arch-mips/syscalls/__timer_settime.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 __timer_settime:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timer_settime
+    .cpload t9
+    li v0, __NR_timer_settime
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __timer_settime
diff --git a/libc/arch-mips/syscalls/__waitid.S b/libc/arch-mips/syscalls/__waitid.S
index 9442ca6c9..c3ade3a21 100644
--- a/libc/arch-mips/syscalls/__waitid.S
+++ b/libc/arch-mips/syscalls/__waitid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl __waitid
     .align 4
@@ -8,16 +10,16 @@
 
 __waitid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_waitid
+    .cpload t9
+    li v0, __NR_waitid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end __waitid
diff --git a/libc/arch-mips/syscalls/_exit.S b/libc/arch-mips/syscalls/_exit.S
index 220876af6..64d5494fb 100644
--- a/libc/arch-mips/syscalls/_exit.S
+++ b/libc/arch-mips/syscalls/_exit.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl _exit
     .align 4
@@ -8,16 +10,16 @@
 
 _exit:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_exit_group
+    .cpload t9
+    li v0, __NR_exit_group
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end _exit
diff --git a/libc/arch-mips/syscalls/_flush_cache.S b/libc/arch-mips/syscalls/_flush_cache.S
index 0ac25761e..1d1484388 100644
--- a/libc/arch-mips/syscalls/_flush_cache.S
+++ b/libc/arch-mips/syscalls/_flush_cache.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 _flush_cache:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_cacheflush
+    .cpload t9
+    li v0, __NR_cacheflush
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end _flush_cache
diff --git a/libc/arch-mips/syscalls/accept.S b/libc/arch-mips/syscalls/accept.S
index f4da4d88a..da29290b3 100644
--- a/libc/arch-mips/syscalls/accept.S
+++ b/libc/arch-mips/syscalls/accept.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl accept
     .align 4
@@ -8,16 +10,16 @@
 
 accept:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_accept
+    .cpload t9
+    li v0, __NR_accept
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end accept
diff --git a/libc/arch-mips/syscalls/acct.S b/libc/arch-mips/syscalls/acct.S
index c641b9c31..05bbdc2ed 100644
--- a/libc/arch-mips/syscalls/acct.S
+++ b/libc/arch-mips/syscalls/acct.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl acct
     .align 4
@@ -8,16 +10,16 @@
 
 acct:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_acct
+    .cpload t9
+    li v0, __NR_acct
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end acct
diff --git a/libc/arch-mips/syscalls/bind.S b/libc/arch-mips/syscalls/bind.S
index 912b16170..e45203fad 100644
--- a/libc/arch-mips/syscalls/bind.S
+++ b/libc/arch-mips/syscalls/bind.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl bind
     .align 4
@@ -8,16 +10,16 @@
 
 bind:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_bind
+    .cpload t9
+    li v0, __NR_bind
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end bind
diff --git a/libc/arch-mips/syscalls/capget.S b/libc/arch-mips/syscalls/capget.S
index 48f7be345..05fe75f94 100644
--- a/libc/arch-mips/syscalls/capget.S
+++ b/libc/arch-mips/syscalls/capget.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl capget
     .align 4
@@ -8,16 +10,16 @@
 
 capget:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_capget
+    .cpload t9
+    li v0, __NR_capget
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end capget
diff --git a/libc/arch-mips/syscalls/capset.S b/libc/arch-mips/syscalls/capset.S
index 40223c296..d731c0906 100644
--- a/libc/arch-mips/syscalls/capset.S
+++ b/libc/arch-mips/syscalls/capset.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl capset
     .align 4
@@ -8,16 +10,16 @@
 
 capset:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_capset
+    .cpload t9
+    li v0, __NR_capset
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end capset
diff --git a/libc/arch-mips/syscalls/chdir.S b/libc/arch-mips/syscalls/chdir.S
index 4f427a124..e757ebf94 100644
--- a/libc/arch-mips/syscalls/chdir.S
+++ b/libc/arch-mips/syscalls/chdir.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl chdir
     .align 4
@@ -8,16 +10,16 @@
 
 chdir:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_chdir
+    .cpload t9
+    li v0, __NR_chdir
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end chdir
diff --git a/libc/arch-mips/syscalls/chroot.S b/libc/arch-mips/syscalls/chroot.S
index a50145907..d3a431d8c 100644
--- a/libc/arch-mips/syscalls/chroot.S
+++ b/libc/arch-mips/syscalls/chroot.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl chroot
     .align 4
@@ -8,16 +10,16 @@
 
 chroot:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_chroot
+    .cpload t9
+    li v0, __NR_chroot
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end chroot
diff --git a/libc/arch-mips/syscalls/clock_getres.S b/libc/arch-mips/syscalls/clock_getres.S
index d3986fcae..7b65c83ba 100644
--- a/libc/arch-mips/syscalls/clock_getres.S
+++ b/libc/arch-mips/syscalls/clock_getres.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 clock_getres:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_clock_getres
+    .cpload t9
+    li v0, __NR_clock_getres
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end clock_getres
diff --git a/libc/arch-mips/syscalls/clock_gettime.S b/libc/arch-mips/syscalls/clock_gettime.S
index fa02309f1..05e21b4af 100644
--- a/libc/arch-mips/syscalls/clock_gettime.S
+++ b/libc/arch-mips/syscalls/clock_gettime.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 clock_gettime:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_clock_gettime
+    .cpload t9
+    li v0, __NR_clock_gettime
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end clock_gettime
diff --git a/libc/arch-mips/syscalls/clock_nanosleep.S b/libc/arch-mips/syscalls/clock_nanosleep.S
index 91a1418e5..03ed9fdfb 100644
--- a/libc/arch-mips/syscalls/clock_nanosleep.S
+++ b/libc/arch-mips/syscalls/clock_nanosleep.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 clock_nanosleep:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_clock_nanosleep
+    .cpload t9
+    li v0, __NR_clock_nanosleep
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end clock_nanosleep
diff --git a/libc/arch-mips/syscalls/clock_settime.S b/libc/arch-mips/syscalls/clock_settime.S
index d8eb8f18c..66719d8ae 100644
--- a/libc/arch-mips/syscalls/clock_settime.S
+++ b/libc/arch-mips/syscalls/clock_settime.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 clock_settime:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_clock_settime
+    .cpload t9
+    li v0, __NR_clock_settime
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end clock_settime
diff --git a/libc/arch-mips/syscalls/close.S b/libc/arch-mips/syscalls/close.S
index 098fdd213..a997dab13 100644
--- a/libc/arch-mips/syscalls/close.S
+++ b/libc/arch-mips/syscalls/close.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl close
     .align 4
@@ -8,16 +10,16 @@
 
 close:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_close
+    .cpload t9
+    li v0, __NR_close
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end close
diff --git a/libc/arch-mips/syscalls/connect.S b/libc/arch-mips/syscalls/connect.S
index d3b0cea16..646eaa507 100644
--- a/libc/arch-mips/syscalls/connect.S
+++ b/libc/arch-mips/syscalls/connect.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl connect
     .align 4
@@ -8,16 +10,16 @@
 
 connect:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_connect
+    .cpload t9
+    li v0, __NR_connect
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end connect
diff --git a/libc/arch-mips/syscalls/delete_module.S b/libc/arch-mips/syscalls/delete_module.S
index ae476978d..a6d03f38a 100644
--- a/libc/arch-mips/syscalls/delete_module.S
+++ b/libc/arch-mips/syscalls/delete_module.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 delete_module:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_delete_module
+    .cpload t9
+    li v0, __NR_delete_module
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end delete_module
diff --git a/libc/arch-mips/syscalls/dup.S b/libc/arch-mips/syscalls/dup.S
index 6cb924fc8..49fbf3969 100644
--- a/libc/arch-mips/syscalls/dup.S
+++ b/libc/arch-mips/syscalls/dup.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl dup
     .align 4
@@ -8,16 +10,16 @@
 
 dup:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_dup
+    .cpload t9
+    li v0, __NR_dup
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end dup
diff --git a/libc/arch-mips/syscalls/dup3.S b/libc/arch-mips/syscalls/dup3.S
index 6a3752cd1..637a7d4d1 100644
--- a/libc/arch-mips/syscalls/dup3.S
+++ b/libc/arch-mips/syscalls/dup3.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl dup3
     .align 4
@@ -8,16 +10,16 @@
 
 dup3:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_dup3
+    .cpload t9
+    li v0, __NR_dup3
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end dup3
diff --git a/libc/arch-mips/syscalls/epoll_create1.S b/libc/arch-mips/syscalls/epoll_create1.S
index 0abaeda34..26fbdd76c 100644
--- a/libc/arch-mips/syscalls/epoll_create1.S
+++ b/libc/arch-mips/syscalls/epoll_create1.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 epoll_create1:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_epoll_create1
+    .cpload t9
+    li v0, __NR_epoll_create1
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end epoll_create1
diff --git a/libc/arch-mips/syscalls/epoll_ctl.S b/libc/arch-mips/syscalls/epoll_ctl.S
index 20d4367e7..77cae6913 100644
--- a/libc/arch-mips/syscalls/epoll_ctl.S
+++ b/libc/arch-mips/syscalls/epoll_ctl.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 epoll_ctl:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_epoll_ctl
+    .cpload t9
+    li v0, __NR_epoll_ctl
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end epoll_ctl
diff --git a/libc/arch-mips/syscalls/eventfd.S b/libc/arch-mips/syscalls/eventfd.S
index f12bc7d59..ada783e9b 100644
--- a/libc/arch-mips/syscalls/eventfd.S
+++ b/libc/arch-mips/syscalls/eventfd.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl eventfd
     .align 4
@@ -8,16 +10,16 @@
 
 eventfd:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_eventfd2
+    .cpload t9
+    li v0, __NR_eventfd2
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end eventfd
diff --git a/libc/arch-mips/syscalls/execve.S b/libc/arch-mips/syscalls/execve.S
index 750b40242..531a7af3c 100644
--- a/libc/arch-mips/syscalls/execve.S
+++ b/libc/arch-mips/syscalls/execve.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl execve
     .align 4
@@ -8,16 +10,16 @@
 
 execve:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_execve
+    .cpload t9
+    li v0, __NR_execve
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end execve
diff --git a/libc/arch-mips/syscalls/faccessat.S b/libc/arch-mips/syscalls/faccessat.S
index ffa4f4291..9735ef128 100644
--- a/libc/arch-mips/syscalls/faccessat.S
+++ b/libc/arch-mips/syscalls/faccessat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl faccessat
     .align 4
@@ -8,16 +10,16 @@
 
 faccessat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_faccessat
+    .cpload t9
+    li v0, __NR_faccessat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end faccessat
diff --git a/libc/arch-mips/syscalls/fallocate64.S b/libc/arch-mips/syscalls/fallocate64.S
index e844d1690..7747f2ac6 100644
--- a/libc/arch-mips/syscalls/fallocate64.S
+++ b/libc/arch-mips/syscalls/fallocate64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fallocate64
     .align 4
@@ -8,16 +10,16 @@
 
 fallocate64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fallocate
+    .cpload t9
+    li v0, __NR_fallocate
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fallocate64
diff --git a/libc/arch-mips/syscalls/fchdir.S b/libc/arch-mips/syscalls/fchdir.S
index ae0b883ff..71fafed21 100644
--- a/libc/arch-mips/syscalls/fchdir.S
+++ b/libc/arch-mips/syscalls/fchdir.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fchdir
     .align 4
@@ -8,16 +10,16 @@
 
 fchdir:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fchdir
+    .cpload t9
+    li v0, __NR_fchdir
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fchdir
diff --git a/libc/arch-mips/syscalls/fchmod.S b/libc/arch-mips/syscalls/fchmod.S
index 272964ecf..77e42050d 100644
--- a/libc/arch-mips/syscalls/fchmod.S
+++ b/libc/arch-mips/syscalls/fchmod.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fchmod
     .align 4
@@ -8,16 +10,16 @@
 
 fchmod:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fchmod
+    .cpload t9
+    li v0, __NR_fchmod
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fchmod
diff --git a/libc/arch-mips/syscalls/fchmodat.S b/libc/arch-mips/syscalls/fchmodat.S
index 388d221b4..3fd74fbc2 100644
--- a/libc/arch-mips/syscalls/fchmodat.S
+++ b/libc/arch-mips/syscalls/fchmodat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fchmodat
     .align 4
@@ -8,16 +10,16 @@
 
 fchmodat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fchmodat
+    .cpload t9
+    li v0, __NR_fchmodat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fchmodat
diff --git a/libc/arch-mips/syscalls/fchown.S b/libc/arch-mips/syscalls/fchown.S
index 52d6e590b..8cf754f04 100644
--- a/libc/arch-mips/syscalls/fchown.S
+++ b/libc/arch-mips/syscalls/fchown.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fchown
     .align 4
@@ -8,16 +10,16 @@
 
 fchown:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fchown
+    .cpload t9
+    li v0, __NR_fchown
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fchown
diff --git a/libc/arch-mips/syscalls/fchownat.S b/libc/arch-mips/syscalls/fchownat.S
index 6913d6c4e..229245845 100644
--- a/libc/arch-mips/syscalls/fchownat.S
+++ b/libc/arch-mips/syscalls/fchownat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fchownat
     .align 4
@@ -8,16 +10,16 @@
 
 fchownat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fchownat
+    .cpload t9
+    li v0, __NR_fchownat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fchownat
diff --git a/libc/arch-mips/syscalls/fdatasync.S b/libc/arch-mips/syscalls/fdatasync.S
index a1d4056c0..899a20929 100644
--- a/libc/arch-mips/syscalls/fdatasync.S
+++ b/libc/arch-mips/syscalls/fdatasync.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fdatasync
     .align 4
@@ -8,16 +10,16 @@
 
 fdatasync:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fdatasync
+    .cpload t9
+    li v0, __NR_fdatasync
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fdatasync
diff --git a/libc/arch-mips/syscalls/fgetxattr.S b/libc/arch-mips/syscalls/fgetxattr.S
index 1d645a555..eb515c9db 100644
--- a/libc/arch-mips/syscalls/fgetxattr.S
+++ b/libc/arch-mips/syscalls/fgetxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fgetxattr
     .align 4
@@ -8,16 +10,16 @@
 
 fgetxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fgetxattr
+    .cpload t9
+    li v0, __NR_fgetxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fgetxattr
diff --git a/libc/arch-mips/syscalls/flistxattr.S b/libc/arch-mips/syscalls/flistxattr.S
index 2cb53c54f..3c4a2b46b 100644
--- a/libc/arch-mips/syscalls/flistxattr.S
+++ b/libc/arch-mips/syscalls/flistxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl flistxattr
     .align 4
@@ -8,16 +10,16 @@
 
 flistxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_flistxattr
+    .cpload t9
+    li v0, __NR_flistxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end flistxattr
diff --git a/libc/arch-mips/syscalls/flock.S b/libc/arch-mips/syscalls/flock.S
index c1723a1f1..00c179f7a 100644
--- a/libc/arch-mips/syscalls/flock.S
+++ b/libc/arch-mips/syscalls/flock.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl flock
     .align 4
@@ -8,16 +10,16 @@
 
 flock:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_flock
+    .cpload t9
+    li v0, __NR_flock
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end flock
diff --git a/libc/arch-mips/syscalls/fremovexattr.S b/libc/arch-mips/syscalls/fremovexattr.S
index 2526ae0e8..91402eb8a 100644
--- a/libc/arch-mips/syscalls/fremovexattr.S
+++ b/libc/arch-mips/syscalls/fremovexattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fremovexattr
     .align 4
@@ -8,16 +10,16 @@
 
 fremovexattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fremovexattr
+    .cpload t9
+    li v0, __NR_fremovexattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fremovexattr
diff --git a/libc/arch-mips/syscalls/fsetxattr.S b/libc/arch-mips/syscalls/fsetxattr.S
index 4552b07dc..eb26bd6d0 100644
--- a/libc/arch-mips/syscalls/fsetxattr.S
+++ b/libc/arch-mips/syscalls/fsetxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fsetxattr
     .align 4
@@ -8,16 +10,16 @@
 
 fsetxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fsetxattr
+    .cpload t9
+    li v0, __NR_fsetxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fsetxattr
diff --git a/libc/arch-mips/syscalls/fstat64.S b/libc/arch-mips/syscalls/fstat64.S
index 904ce8603..f557dc897 100644
--- a/libc/arch-mips/syscalls/fstat64.S
+++ b/libc/arch-mips/syscalls/fstat64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fstat64
     .align 4
@@ -8,16 +10,16 @@
 
 fstat64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fstat64
+    .cpload t9
+    li v0, __NR_fstat64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fstat64
diff --git a/libc/arch-mips/syscalls/fstatat64.S b/libc/arch-mips/syscalls/fstatat64.S
index 8c81a9fca..f5aa9ad8e 100644
--- a/libc/arch-mips/syscalls/fstatat64.S
+++ b/libc/arch-mips/syscalls/fstatat64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fstatat64
     .align 4
@@ -8,16 +10,16 @@
 
 fstatat64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fstatat64
+    .cpload t9
+    li v0, __NR_fstatat64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fstatat64
diff --git a/libc/arch-mips/syscalls/fsync.S b/libc/arch-mips/syscalls/fsync.S
index 383bd0c33..5718e40ae 100644
--- a/libc/arch-mips/syscalls/fsync.S
+++ b/libc/arch-mips/syscalls/fsync.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl fsync
     .align 4
@@ -8,16 +10,16 @@
 
 fsync:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_fsync
+    .cpload t9
+    li v0, __NR_fsync
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end fsync
diff --git a/libc/arch-mips/syscalls/ftruncate.S b/libc/arch-mips/syscalls/ftruncate.S
index 797d23942..9004c9a1f 100644
--- a/libc/arch-mips/syscalls/ftruncate.S
+++ b/libc/arch-mips/syscalls/ftruncate.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl ftruncate
     .align 4
@@ -8,16 +10,16 @@
 
 ftruncate:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_ftruncate
+    .cpload t9
+    li v0, __NR_ftruncate
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end ftruncate
diff --git a/libc/arch-mips/syscalls/ftruncate64.S b/libc/arch-mips/syscalls/ftruncate64.S
index e7f7f8147..27c7c2ad0 100644
--- a/libc/arch-mips/syscalls/ftruncate64.S
+++ b/libc/arch-mips/syscalls/ftruncate64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl ftruncate64
     .align 4
@@ -8,16 +10,16 @@
 
 ftruncate64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_ftruncate64
+    .cpload t9
+    li v0, __NR_ftruncate64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end ftruncate64
diff --git a/libc/arch-mips/syscalls/futex.S b/libc/arch-mips/syscalls/futex.S
index 25c88c85c..bf935e03d 100644
--- a/libc/arch-mips/syscalls/futex.S
+++ b/libc/arch-mips/syscalls/futex.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl futex
     .align 4
@@ -8,16 +10,16 @@
 
 futex:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_futex
+    .cpload t9
+    li v0, __NR_futex
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end futex
diff --git a/libc/arch-mips/syscalls/getdents.S b/libc/arch-mips/syscalls/getdents.S
index 7b8006a4f..7ac22e3d8 100644
--- a/libc/arch-mips/syscalls/getdents.S
+++ b/libc/arch-mips/syscalls/getdents.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getdents
     .align 4
@@ -8,16 +10,16 @@
 
 getdents:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getdents64
+    .cpload t9
+    li v0, __NR_getdents64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getdents
diff --git a/libc/arch-mips/syscalls/getegid.S b/libc/arch-mips/syscalls/getegid.S
index 5d75420df..da9fb6c62 100644
--- a/libc/arch-mips/syscalls/getegid.S
+++ b/libc/arch-mips/syscalls/getegid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getegid
     .align 4
@@ -8,16 +10,16 @@
 
 getegid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getegid
+    .cpload t9
+    li v0, __NR_getegid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getegid
diff --git a/libc/arch-mips/syscalls/geteuid.S b/libc/arch-mips/syscalls/geteuid.S
index f878ea78e..92cfcf922 100644
--- a/libc/arch-mips/syscalls/geteuid.S
+++ b/libc/arch-mips/syscalls/geteuid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl geteuid
     .align 4
@@ -8,16 +10,16 @@
 
 geteuid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_geteuid
+    .cpload t9
+    li v0, __NR_geteuid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end geteuid
diff --git a/libc/arch-mips/syscalls/getgid.S b/libc/arch-mips/syscalls/getgid.S
index 207d1a116..8fa39b2c1 100644
--- a/libc/arch-mips/syscalls/getgid.S
+++ b/libc/arch-mips/syscalls/getgid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getgid
     .align 4
@@ -8,16 +10,16 @@
 
 getgid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getgid
+    .cpload t9
+    li v0, __NR_getgid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getgid
diff --git a/libc/arch-mips/syscalls/getgroups.S b/libc/arch-mips/syscalls/getgroups.S
index d0a10a3b2..0399240f3 100644
--- a/libc/arch-mips/syscalls/getgroups.S
+++ b/libc/arch-mips/syscalls/getgroups.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getgroups
     .align 4
@@ -8,16 +10,16 @@
 
 getgroups:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getgroups
+    .cpload t9
+    li v0, __NR_getgroups
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getgroups
diff --git a/libc/arch-mips/syscalls/getitimer.S b/libc/arch-mips/syscalls/getitimer.S
index 40f90f26d..c5f5b2d92 100644
--- a/libc/arch-mips/syscalls/getitimer.S
+++ b/libc/arch-mips/syscalls/getitimer.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getitimer
     .align 4
@@ -8,16 +10,16 @@
 
 getitimer:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getitimer
+    .cpload t9
+    li v0, __NR_getitimer
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getitimer
diff --git a/libc/arch-mips/syscalls/getpeername.S b/libc/arch-mips/syscalls/getpeername.S
index 6d491deac..b70a04efb 100644
--- a/libc/arch-mips/syscalls/getpeername.S
+++ b/libc/arch-mips/syscalls/getpeername.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getpeername
     .align 4
@@ -8,16 +10,16 @@
 
 getpeername:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getpeername
+    .cpload t9
+    li v0, __NR_getpeername
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getpeername
diff --git a/libc/arch-mips/syscalls/getpgid.S b/libc/arch-mips/syscalls/getpgid.S
index dc6ec9690..097edae5a 100644
--- a/libc/arch-mips/syscalls/getpgid.S
+++ b/libc/arch-mips/syscalls/getpgid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getpgid
     .align 4
@@ -8,16 +10,16 @@
 
 getpgid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getpgid
+    .cpload t9
+    li v0, __NR_getpgid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getpgid
diff --git a/libc/arch-mips/syscalls/getpid.S b/libc/arch-mips/syscalls/getpid.S
index 244d25637..37d26a597 100644
--- a/libc/arch-mips/syscalls/getpid.S
+++ b/libc/arch-mips/syscalls/getpid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getpid
     .align 4
@@ -8,16 +10,16 @@
 
 getpid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getpid
+    .cpload t9
+    li v0, __NR_getpid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getpid
diff --git a/libc/arch-mips/syscalls/getppid.S b/libc/arch-mips/syscalls/getppid.S
index 1973424fd..ac2341d58 100644
--- a/libc/arch-mips/syscalls/getppid.S
+++ b/libc/arch-mips/syscalls/getppid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getppid
     .align 4
@@ -8,16 +10,16 @@
 
 getppid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getppid
+    .cpload t9
+    li v0, __NR_getppid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getppid
diff --git a/libc/arch-mips/syscalls/getresgid.S b/libc/arch-mips/syscalls/getresgid.S
index b78e90c25..ee0947397 100644
--- a/libc/arch-mips/syscalls/getresgid.S
+++ b/libc/arch-mips/syscalls/getresgid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getresgid
     .align 4
@@ -8,16 +10,16 @@
 
 getresgid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getresgid
+    .cpload t9
+    li v0, __NR_getresgid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getresgid
diff --git a/libc/arch-mips/syscalls/getresuid.S b/libc/arch-mips/syscalls/getresuid.S
index 336c0490d..e22d10cf2 100644
--- a/libc/arch-mips/syscalls/getresuid.S
+++ b/libc/arch-mips/syscalls/getresuid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getresuid
     .align 4
@@ -8,16 +10,16 @@
 
 getresuid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getresuid
+    .cpload t9
+    li v0, __NR_getresuid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getresuid
diff --git a/libc/arch-mips/syscalls/getrlimit.S b/libc/arch-mips/syscalls/getrlimit.S
index 557c2c17f..8e11e25ee 100644
--- a/libc/arch-mips/syscalls/getrlimit.S
+++ b/libc/arch-mips/syscalls/getrlimit.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getrlimit
     .align 4
@@ -8,16 +10,16 @@
 
 getrlimit:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getrlimit
+    .cpload t9
+    li v0, __NR_getrlimit
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getrlimit
diff --git a/libc/arch-mips/syscalls/getrusage.S b/libc/arch-mips/syscalls/getrusage.S
index c2750f9f9..c94b5ba86 100644
--- a/libc/arch-mips/syscalls/getrusage.S
+++ b/libc/arch-mips/syscalls/getrusage.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getrusage
     .align 4
@@ -8,16 +10,16 @@
 
 getrusage:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getrusage
+    .cpload t9
+    li v0, __NR_getrusage
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getrusage
diff --git a/libc/arch-mips/syscalls/getsid.S b/libc/arch-mips/syscalls/getsid.S
index 9ceb65db1..d1f5840f9 100644
--- a/libc/arch-mips/syscalls/getsid.S
+++ b/libc/arch-mips/syscalls/getsid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getsid
     .align 4
@@ -8,16 +10,16 @@
 
 getsid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getsid
+    .cpload t9
+    li v0, __NR_getsid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getsid
diff --git a/libc/arch-mips/syscalls/getsockname.S b/libc/arch-mips/syscalls/getsockname.S
index 43b28c2f0..1cc953013 100644
--- a/libc/arch-mips/syscalls/getsockname.S
+++ b/libc/arch-mips/syscalls/getsockname.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getsockname
     .align 4
@@ -8,16 +10,16 @@
 
 getsockname:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getsockname
+    .cpload t9
+    li v0, __NR_getsockname
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getsockname
diff --git a/libc/arch-mips/syscalls/getsockopt.S b/libc/arch-mips/syscalls/getsockopt.S
index affe53904..73602a25c 100644
--- a/libc/arch-mips/syscalls/getsockopt.S
+++ b/libc/arch-mips/syscalls/getsockopt.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getsockopt
     .align 4
@@ -8,16 +10,16 @@
 
 getsockopt:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getsockopt
+    .cpload t9
+    li v0, __NR_getsockopt
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getsockopt
diff --git a/libc/arch-mips/syscalls/gettid.S b/libc/arch-mips/syscalls/gettid.S
index d258ef259..340b52fda 100644
--- a/libc/arch-mips/syscalls/gettid.S
+++ b/libc/arch-mips/syscalls/gettid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl gettid
     .align 4
@@ -8,16 +10,16 @@
 
 gettid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_gettid
+    .cpload t9
+    li v0, __NR_gettid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end gettid
diff --git a/libc/arch-mips/syscalls/gettimeofday.S b/libc/arch-mips/syscalls/gettimeofday.S
index 006752ef5..f0fa982b4 100644
--- a/libc/arch-mips/syscalls/gettimeofday.S
+++ b/libc/arch-mips/syscalls/gettimeofday.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl gettimeofday
     .align 4
@@ -8,16 +10,16 @@
 
 gettimeofday:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_gettimeofday
+    .cpload t9
+    li v0, __NR_gettimeofday
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end gettimeofday
diff --git a/libc/arch-mips/syscalls/getuid.S b/libc/arch-mips/syscalls/getuid.S
index 747318a32..ac416ebc1 100644
--- a/libc/arch-mips/syscalls/getuid.S
+++ b/libc/arch-mips/syscalls/getuid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getuid
     .align 4
@@ -8,16 +10,16 @@
 
 getuid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getuid
+    .cpload t9
+    li v0, __NR_getuid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getuid
diff --git a/libc/arch-mips/syscalls/getxattr.S b/libc/arch-mips/syscalls/getxattr.S
index 2f82c4c66..e0181c815 100644
--- a/libc/arch-mips/syscalls/getxattr.S
+++ b/libc/arch-mips/syscalls/getxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl getxattr
     .align 4
@@ -8,16 +10,16 @@
 
 getxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_getxattr
+    .cpload t9
+    li v0, __NR_getxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end getxattr
diff --git a/libc/arch-mips/syscalls/init_module.S b/libc/arch-mips/syscalls/init_module.S
index ee644b38f..b11ae82fd 100644
--- a/libc/arch-mips/syscalls/init_module.S
+++ b/libc/arch-mips/syscalls/init_module.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 init_module:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_init_module
+    .cpload t9
+    li v0, __NR_init_module
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end init_module
diff --git a/libc/arch-mips/syscalls/inotify_add_watch.S b/libc/arch-mips/syscalls/inotify_add_watch.S
index f1c4d92fd..e3b228804 100644
--- a/libc/arch-mips/syscalls/inotify_add_watch.S
+++ b/libc/arch-mips/syscalls/inotify_add_watch.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 inotify_add_watch:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_inotify_add_watch
+    .cpload t9
+    li v0, __NR_inotify_add_watch
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end inotify_add_watch
diff --git a/libc/arch-mips/syscalls/inotify_init1.S b/libc/arch-mips/syscalls/inotify_init1.S
index c3fcf4899..edd98b5c0 100644
--- a/libc/arch-mips/syscalls/inotify_init1.S
+++ b/libc/arch-mips/syscalls/inotify_init1.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 inotify_init1:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_inotify_init1
+    .cpload t9
+    li v0, __NR_inotify_init1
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end inotify_init1
diff --git a/libc/arch-mips/syscalls/inotify_rm_watch.S b/libc/arch-mips/syscalls/inotify_rm_watch.S
index 13191af76..3b8df5b24 100644
--- a/libc/arch-mips/syscalls/inotify_rm_watch.S
+++ b/libc/arch-mips/syscalls/inotify_rm_watch.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 inotify_rm_watch:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_inotify_rm_watch
+    .cpload t9
+    li v0, __NR_inotify_rm_watch
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end inotify_rm_watch
diff --git a/libc/arch-mips/syscalls/ioprio_get.S b/libc/arch-mips/syscalls/ioprio_get.S
index b8bd1d35e..cb03550cf 100644
--- a/libc/arch-mips/syscalls/ioprio_get.S
+++ b/libc/arch-mips/syscalls/ioprio_get.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 ioprio_get:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_ioprio_get
+    .cpload t9
+    li v0, __NR_ioprio_get
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end ioprio_get
diff --git a/libc/arch-mips/syscalls/ioprio_set.S b/libc/arch-mips/syscalls/ioprio_set.S
index c5b3bdc21..ed0c5e52d 100644
--- a/libc/arch-mips/syscalls/ioprio_set.S
+++ b/libc/arch-mips/syscalls/ioprio_set.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 ioprio_set:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_ioprio_set
+    .cpload t9
+    li v0, __NR_ioprio_set
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end ioprio_set
diff --git a/libc/arch-mips/syscalls/kill.S b/libc/arch-mips/syscalls/kill.S
index 20a484eb7..3cc121ce7 100644
--- a/libc/arch-mips/syscalls/kill.S
+++ b/libc/arch-mips/syscalls/kill.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl kill
     .align 4
@@ -8,16 +10,16 @@
 
 kill:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_kill
+    .cpload t9
+    li v0, __NR_kill
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end kill
diff --git a/libc/arch-mips/syscalls/klogctl.S b/libc/arch-mips/syscalls/klogctl.S
index 5d30db2c7..b7f901e35 100644
--- a/libc/arch-mips/syscalls/klogctl.S
+++ b/libc/arch-mips/syscalls/klogctl.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl klogctl
     .align 4
@@ -8,16 +10,16 @@
 
 klogctl:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_syslog
+    .cpload t9
+    li v0, __NR_syslog
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end klogctl
diff --git a/libc/arch-mips/syscalls/lgetxattr.S b/libc/arch-mips/syscalls/lgetxattr.S
index 6266aafb6..1384ed5c9 100644
--- a/libc/arch-mips/syscalls/lgetxattr.S
+++ b/libc/arch-mips/syscalls/lgetxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl lgetxattr
     .align 4
@@ -8,16 +10,16 @@
 
 lgetxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_lgetxattr
+    .cpload t9
+    li v0, __NR_lgetxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end lgetxattr
diff --git a/libc/arch-mips/syscalls/linkat.S b/libc/arch-mips/syscalls/linkat.S
index dae07dd6d..be8207aad 100644
--- a/libc/arch-mips/syscalls/linkat.S
+++ b/libc/arch-mips/syscalls/linkat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl linkat
     .align 4
@@ -8,16 +10,16 @@
 
 linkat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_linkat
+    .cpload t9
+    li v0, __NR_linkat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end linkat
diff --git a/libc/arch-mips/syscalls/listen.S b/libc/arch-mips/syscalls/listen.S
index f2e608398..e684c792f 100644
--- a/libc/arch-mips/syscalls/listen.S
+++ b/libc/arch-mips/syscalls/listen.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl listen
     .align 4
@@ -8,16 +10,16 @@
 
 listen:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_listen
+    .cpload t9
+    li v0, __NR_listen
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end listen
diff --git a/libc/arch-mips/syscalls/listxattr.S b/libc/arch-mips/syscalls/listxattr.S
index e75234012..b7699db88 100644
--- a/libc/arch-mips/syscalls/listxattr.S
+++ b/libc/arch-mips/syscalls/listxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl listxattr
     .align 4
@@ -8,16 +10,16 @@
 
 listxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_listxattr
+    .cpload t9
+    li v0, __NR_listxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end listxattr
diff --git a/libc/arch-mips/syscalls/llistxattr.S b/libc/arch-mips/syscalls/llistxattr.S
index 9dc868e5a..36d3787ca 100644
--- a/libc/arch-mips/syscalls/llistxattr.S
+++ b/libc/arch-mips/syscalls/llistxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl llistxattr
     .align 4
@@ -8,16 +10,16 @@
 
 llistxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_llistxattr
+    .cpload t9
+    li v0, __NR_llistxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end llistxattr
diff --git a/libc/arch-mips/syscalls/lremovexattr.S b/libc/arch-mips/syscalls/lremovexattr.S
index d7e6609da..fb03fc3f9 100644
--- a/libc/arch-mips/syscalls/lremovexattr.S
+++ b/libc/arch-mips/syscalls/lremovexattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl lremovexattr
     .align 4
@@ -8,16 +10,16 @@
 
 lremovexattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_lremovexattr
+    .cpload t9
+    li v0, __NR_lremovexattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end lremovexattr
diff --git a/libc/arch-mips/syscalls/lseek.S b/libc/arch-mips/syscalls/lseek.S
index 269cc955b..6ec2c014c 100644
--- a/libc/arch-mips/syscalls/lseek.S
+++ b/libc/arch-mips/syscalls/lseek.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl lseek
     .align 4
@@ -8,16 +10,16 @@
 
 lseek:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_lseek
+    .cpload t9
+    li v0, __NR_lseek
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end lseek
diff --git a/libc/arch-mips/syscalls/lsetxattr.S b/libc/arch-mips/syscalls/lsetxattr.S
index 2dfd24a52..605cb4ac1 100644
--- a/libc/arch-mips/syscalls/lsetxattr.S
+++ b/libc/arch-mips/syscalls/lsetxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl lsetxattr
     .align 4
@@ -8,16 +10,16 @@
 
 lsetxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_lsetxattr
+    .cpload t9
+    li v0, __NR_lsetxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end lsetxattr
diff --git a/libc/arch-mips/syscalls/madvise.S b/libc/arch-mips/syscalls/madvise.S
index 831827230..7a4c2faa1 100644
--- a/libc/arch-mips/syscalls/madvise.S
+++ b/libc/arch-mips/syscalls/madvise.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl madvise
     .align 4
@@ -8,16 +10,16 @@
 
 madvise:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_madvise
+    .cpload t9
+    li v0, __NR_madvise
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end madvise
diff --git a/libc/arch-mips/syscalls/mincore.S b/libc/arch-mips/syscalls/mincore.S
index 629a46845..2ea3269d8 100644
--- a/libc/arch-mips/syscalls/mincore.S
+++ b/libc/arch-mips/syscalls/mincore.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mincore
     .align 4
@@ -8,16 +10,16 @@
 
 mincore:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mincore
+    .cpload t9
+    li v0, __NR_mincore
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mincore
diff --git a/libc/arch-mips/syscalls/mkdirat.S b/libc/arch-mips/syscalls/mkdirat.S
index 3f8bc190f..97fcfa972 100644
--- a/libc/arch-mips/syscalls/mkdirat.S
+++ b/libc/arch-mips/syscalls/mkdirat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mkdirat
     .align 4
@@ -8,16 +10,16 @@
 
 mkdirat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mkdirat
+    .cpload t9
+    li v0, __NR_mkdirat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mkdirat
diff --git a/libc/arch-mips/syscalls/mknodat.S b/libc/arch-mips/syscalls/mknodat.S
index fc05bb3f0..32c23c594 100644
--- a/libc/arch-mips/syscalls/mknodat.S
+++ b/libc/arch-mips/syscalls/mknodat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mknodat
     .align 4
@@ -8,16 +10,16 @@
 
 mknodat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mknodat
+    .cpload t9
+    li v0, __NR_mknodat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mknodat
diff --git a/libc/arch-mips/syscalls/mlock.S b/libc/arch-mips/syscalls/mlock.S
index 20cacda93..1fd890f59 100644
--- a/libc/arch-mips/syscalls/mlock.S
+++ b/libc/arch-mips/syscalls/mlock.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mlock
     .align 4
@@ -8,16 +10,16 @@
 
 mlock:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mlock
+    .cpload t9
+    li v0, __NR_mlock
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mlock
diff --git a/libc/arch-mips/syscalls/mlockall.S b/libc/arch-mips/syscalls/mlockall.S
index 0aac08783..1480af646 100644
--- a/libc/arch-mips/syscalls/mlockall.S
+++ b/libc/arch-mips/syscalls/mlockall.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mlockall
     .align 4
@@ -8,16 +10,16 @@
 
 mlockall:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mlockall
+    .cpload t9
+    li v0, __NR_mlockall
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mlockall
diff --git a/libc/arch-mips/syscalls/mount.S b/libc/arch-mips/syscalls/mount.S
index 1f951cee8..d64db8113 100644
--- a/libc/arch-mips/syscalls/mount.S
+++ b/libc/arch-mips/syscalls/mount.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mount
     .align 4
@@ -8,16 +10,16 @@
 
 mount:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mount
+    .cpload t9
+    li v0, __NR_mount
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mount
diff --git a/libc/arch-mips/syscalls/mprotect.S b/libc/arch-mips/syscalls/mprotect.S
index 7d9e784df..fbfd535b8 100644
--- a/libc/arch-mips/syscalls/mprotect.S
+++ b/libc/arch-mips/syscalls/mprotect.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mprotect
     .align 4
@@ -8,16 +10,16 @@
 
 mprotect:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mprotect
+    .cpload t9
+    li v0, __NR_mprotect
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mprotect
diff --git a/libc/arch-mips/syscalls/mremap.S b/libc/arch-mips/syscalls/mremap.S
index 22ddda922..30c81b5f7 100644
--- a/libc/arch-mips/syscalls/mremap.S
+++ b/libc/arch-mips/syscalls/mremap.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl mremap
     .align 4
@@ -8,16 +10,16 @@
 
 mremap:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_mremap
+    .cpload t9
+    li v0, __NR_mremap
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end mremap
diff --git a/libc/arch-mips/syscalls/msync.S b/libc/arch-mips/syscalls/msync.S
index 4969433f4..4b208309f 100644
--- a/libc/arch-mips/syscalls/msync.S
+++ b/libc/arch-mips/syscalls/msync.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl msync
     .align 4
@@ -8,16 +10,16 @@
 
 msync:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_msync
+    .cpload t9
+    li v0, __NR_msync
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end msync
diff --git a/libc/arch-mips/syscalls/munlock.S b/libc/arch-mips/syscalls/munlock.S
index 59f1d446e..58e556e7c 100644
--- a/libc/arch-mips/syscalls/munlock.S
+++ b/libc/arch-mips/syscalls/munlock.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl munlock
     .align 4
@@ -8,16 +10,16 @@
 
 munlock:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_munlock
+    .cpload t9
+    li v0, __NR_munlock
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end munlock
diff --git a/libc/arch-mips/syscalls/munlockall.S b/libc/arch-mips/syscalls/munlockall.S
index d0a8e9f50..f8014e859 100644
--- a/libc/arch-mips/syscalls/munlockall.S
+++ b/libc/arch-mips/syscalls/munlockall.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl munlockall
     .align 4
@@ -8,16 +10,16 @@
 
 munlockall:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_munlockall
+    .cpload t9
+    li v0, __NR_munlockall
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end munlockall
diff --git a/libc/arch-mips/syscalls/munmap.S b/libc/arch-mips/syscalls/munmap.S
index d4c1057a6..e0d69bae3 100644
--- a/libc/arch-mips/syscalls/munmap.S
+++ b/libc/arch-mips/syscalls/munmap.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl munmap
     .align 4
@@ -8,16 +10,16 @@
 
 munmap:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_munmap
+    .cpload t9
+    li v0, __NR_munmap
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end munmap
diff --git a/libc/arch-mips/syscalls/nanosleep.S b/libc/arch-mips/syscalls/nanosleep.S
index ad3b0f95a..723775bd3 100644
--- a/libc/arch-mips/syscalls/nanosleep.S
+++ b/libc/arch-mips/syscalls/nanosleep.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl nanosleep
     .align 4
@@ -8,16 +10,16 @@
 
 nanosleep:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_nanosleep
+    .cpload t9
+    li v0, __NR_nanosleep
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end nanosleep
diff --git a/libc/arch-mips/syscalls/perf_event_open.S b/libc/arch-mips/syscalls/perf_event_open.S
index edd8b85e2..b5454c7b6 100644
--- a/libc/arch-mips/syscalls/perf_event_open.S
+++ b/libc/arch-mips/syscalls/perf_event_open.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 perf_event_open:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_perf_event_open
+    .cpload t9
+    li v0, __NR_perf_event_open
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end perf_event_open
diff --git a/libc/arch-mips/syscalls/personality.S b/libc/arch-mips/syscalls/personality.S
index 59aaeac08..fbd524f5f 100644
--- a/libc/arch-mips/syscalls/personality.S
+++ b/libc/arch-mips/syscalls/personality.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl personality
     .align 4
@@ -8,16 +10,16 @@
 
 personality:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_personality
+    .cpload t9
+    li v0, __NR_personality
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end personality
diff --git a/libc/arch-mips/syscalls/pipe2.S b/libc/arch-mips/syscalls/pipe2.S
index 798bd7b17..2e5ee4fdb 100644
--- a/libc/arch-mips/syscalls/pipe2.S
+++ b/libc/arch-mips/syscalls/pipe2.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl pipe2
     .align 4
@@ -8,16 +10,16 @@
 
 pipe2:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_pipe2
+    .cpload t9
+    li v0, __NR_pipe2
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end pipe2
diff --git a/libc/arch-mips/syscalls/prctl.S b/libc/arch-mips/syscalls/prctl.S
index 5e9a28df1..2d4bc16e2 100644
--- a/libc/arch-mips/syscalls/prctl.S
+++ b/libc/arch-mips/syscalls/prctl.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl prctl
     .align 4
@@ -8,16 +10,16 @@
 
 prctl:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_prctl
+    .cpload t9
+    li v0, __NR_prctl
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end prctl
diff --git a/libc/arch-mips/syscalls/pread64.S b/libc/arch-mips/syscalls/pread64.S
index 870b13861..9505acf2d 100644
--- a/libc/arch-mips/syscalls/pread64.S
+++ b/libc/arch-mips/syscalls/pread64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl pread64
     .align 4
@@ -8,16 +10,16 @@
 
 pread64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_pread64
+    .cpload t9
+    li v0, __NR_pread64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end pread64
diff --git a/libc/arch-mips/syscalls/prlimit64.S b/libc/arch-mips/syscalls/prlimit64.S
index 17e9157fa..fa3ba763d 100644
--- a/libc/arch-mips/syscalls/prlimit64.S
+++ b/libc/arch-mips/syscalls/prlimit64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl prlimit64
     .align 4
@@ -8,16 +10,16 @@
 
 prlimit64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_prlimit64
+    .cpload t9
+    li v0, __NR_prlimit64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end prlimit64
diff --git a/libc/arch-mips/syscalls/pwrite64.S b/libc/arch-mips/syscalls/pwrite64.S
index 1e808ff7f..96b160389 100644
--- a/libc/arch-mips/syscalls/pwrite64.S
+++ b/libc/arch-mips/syscalls/pwrite64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl pwrite64
     .align 4
@@ -8,16 +10,16 @@
 
 pwrite64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_pwrite64
+    .cpload t9
+    li v0, __NR_pwrite64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end pwrite64
diff --git a/libc/arch-mips/syscalls/read.S b/libc/arch-mips/syscalls/read.S
index c6498373b..7915d170d 100644
--- a/libc/arch-mips/syscalls/read.S
+++ b/libc/arch-mips/syscalls/read.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl read
     .align 4
@@ -8,16 +10,16 @@
 
 read:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_read
+    .cpload t9
+    li v0, __NR_read
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end read
diff --git a/libc/arch-mips/syscalls/readahead.S b/libc/arch-mips/syscalls/readahead.S
index 09eab9e73..5bc5796a4 100644
--- a/libc/arch-mips/syscalls/readahead.S
+++ b/libc/arch-mips/syscalls/readahead.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl readahead
     .align 4
@@ -8,16 +10,16 @@
 
 readahead:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_readahead
+    .cpload t9
+    li v0, __NR_readahead
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end readahead
diff --git a/libc/arch-mips/syscalls/readlinkat.S b/libc/arch-mips/syscalls/readlinkat.S
index 3e5d72fd3..2c2b079a2 100644
--- a/libc/arch-mips/syscalls/readlinkat.S
+++ b/libc/arch-mips/syscalls/readlinkat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl readlinkat
     .align 4
@@ -8,16 +10,16 @@
 
 readlinkat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_readlinkat
+    .cpload t9
+    li v0, __NR_readlinkat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end readlinkat
diff --git a/libc/arch-mips/syscalls/readv.S b/libc/arch-mips/syscalls/readv.S
index 1f367bed7..fa429de99 100644
--- a/libc/arch-mips/syscalls/readv.S
+++ b/libc/arch-mips/syscalls/readv.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl readv
     .align 4
@@ -8,16 +10,16 @@
 
 readv:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_readv
+    .cpload t9
+    li v0, __NR_readv
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end readv
diff --git a/libc/arch-mips/syscalls/recvfrom.S b/libc/arch-mips/syscalls/recvfrom.S
index 3c2303c06..6fa9d6a66 100644
--- a/libc/arch-mips/syscalls/recvfrom.S
+++ b/libc/arch-mips/syscalls/recvfrom.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl recvfrom
     .align 4
@@ -8,16 +10,16 @@
 
 recvfrom:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_recvfrom
+    .cpload t9
+    li v0, __NR_recvfrom
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end recvfrom
diff --git a/libc/arch-mips/syscalls/recvmsg.S b/libc/arch-mips/syscalls/recvmsg.S
index aaf022f7d..55b861a49 100644
--- a/libc/arch-mips/syscalls/recvmsg.S
+++ b/libc/arch-mips/syscalls/recvmsg.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl recvmsg
     .align 4
@@ -8,16 +10,16 @@
 
 recvmsg:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_recvmsg
+    .cpload t9
+    li v0, __NR_recvmsg
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end recvmsg
diff --git a/libc/arch-mips/syscalls/removexattr.S b/libc/arch-mips/syscalls/removexattr.S
index 29df5d2c2..a911d31d6 100644
--- a/libc/arch-mips/syscalls/removexattr.S
+++ b/libc/arch-mips/syscalls/removexattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl removexattr
     .align 4
@@ -8,16 +10,16 @@
 
 removexattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_removexattr
+    .cpload t9
+    li v0, __NR_removexattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end removexattr
diff --git a/libc/arch-mips/syscalls/renameat.S b/libc/arch-mips/syscalls/renameat.S
index b7c210eaf..3c00ec090 100644
--- a/libc/arch-mips/syscalls/renameat.S
+++ b/libc/arch-mips/syscalls/renameat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl renameat
     .align 4
@@ -8,16 +10,16 @@
 
 renameat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_renameat
+    .cpload t9
+    li v0, __NR_renameat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end renameat
diff --git a/libc/arch-mips/syscalls/sched_get_priority_max.S b/libc/arch-mips/syscalls/sched_get_priority_max.S
index 6d63fec29..77e937180 100644
--- a/libc/arch-mips/syscalls/sched_get_priority_max.S
+++ b/libc/arch-mips/syscalls/sched_get_priority_max.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_get_priority_max:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_get_priority_max
+    .cpload t9
+    li v0, __NR_sched_get_priority_max
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_get_priority_max
diff --git a/libc/arch-mips/syscalls/sched_get_priority_min.S b/libc/arch-mips/syscalls/sched_get_priority_min.S
index de88b3e5f..e91c12d17 100644
--- a/libc/arch-mips/syscalls/sched_get_priority_min.S
+++ b/libc/arch-mips/syscalls/sched_get_priority_min.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_get_priority_min:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_get_priority_min
+    .cpload t9
+    li v0, __NR_sched_get_priority_min
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_get_priority_min
diff --git a/libc/arch-mips/syscalls/sched_getparam.S b/libc/arch-mips/syscalls/sched_getparam.S
index ae261dbe9..3ff3bf577 100644
--- a/libc/arch-mips/syscalls/sched_getparam.S
+++ b/libc/arch-mips/syscalls/sched_getparam.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_getparam:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_getparam
+    .cpload t9
+    li v0, __NR_sched_getparam
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_getparam
diff --git a/libc/arch-mips/syscalls/sched_getscheduler.S b/libc/arch-mips/syscalls/sched_getscheduler.S
index 6a4e6f6ac..d07a4f493 100644
--- a/libc/arch-mips/syscalls/sched_getscheduler.S
+++ b/libc/arch-mips/syscalls/sched_getscheduler.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_getscheduler:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_getscheduler
+    .cpload t9
+    li v0, __NR_sched_getscheduler
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_getscheduler
diff --git a/libc/arch-mips/syscalls/sched_rr_get_interval.S b/libc/arch-mips/syscalls/sched_rr_get_interval.S
index 436f8b32d..656dc3156 100644
--- a/libc/arch-mips/syscalls/sched_rr_get_interval.S
+++ b/libc/arch-mips/syscalls/sched_rr_get_interval.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_rr_get_interval:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_rr_get_interval
+    .cpload t9
+    li v0, __NR_sched_rr_get_interval
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_rr_get_interval
diff --git a/libc/arch-mips/syscalls/sched_setaffinity.S b/libc/arch-mips/syscalls/sched_setaffinity.S
index 98bf4585c..f6ea42538 100644
--- a/libc/arch-mips/syscalls/sched_setaffinity.S
+++ b/libc/arch-mips/syscalls/sched_setaffinity.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_setaffinity:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_setaffinity
+    .cpload t9
+    li v0, __NR_sched_setaffinity
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_setaffinity
diff --git a/libc/arch-mips/syscalls/sched_setparam.S b/libc/arch-mips/syscalls/sched_setparam.S
index 2c03e936f..2bdd79070 100644
--- a/libc/arch-mips/syscalls/sched_setparam.S
+++ b/libc/arch-mips/syscalls/sched_setparam.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_setparam:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_setparam
+    .cpload t9
+    li v0, __NR_sched_setparam
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_setparam
diff --git a/libc/arch-mips/syscalls/sched_setscheduler.S b/libc/arch-mips/syscalls/sched_setscheduler.S
index adb1f1400..c895a8783 100644
--- a/libc/arch-mips/syscalls/sched_setscheduler.S
+++ b/libc/arch-mips/syscalls/sched_setscheduler.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_setscheduler:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_setscheduler
+    .cpload t9
+    li v0, __NR_sched_setscheduler
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_setscheduler
diff --git a/libc/arch-mips/syscalls/sched_yield.S b/libc/arch-mips/syscalls/sched_yield.S
index cbe799c4b..6a3b70928 100644
--- a/libc/arch-mips/syscalls/sched_yield.S
+++ b/libc/arch-mips/syscalls/sched_yield.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 sched_yield:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sched_yield
+    .cpload t9
+    li v0, __NR_sched_yield
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sched_yield
diff --git a/libc/arch-mips/syscalls/sendfile.S b/libc/arch-mips/syscalls/sendfile.S
index 219a311f4..fb09701e6 100644
--- a/libc/arch-mips/syscalls/sendfile.S
+++ b/libc/arch-mips/syscalls/sendfile.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl sendfile
     .align 4
@@ -8,16 +10,16 @@
 
 sendfile:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sendfile
+    .cpload t9
+    li v0, __NR_sendfile
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sendfile
diff --git a/libc/arch-mips/syscalls/sendfile64.S b/libc/arch-mips/syscalls/sendfile64.S
index 7669973a5..1a169000a 100644
--- a/libc/arch-mips/syscalls/sendfile64.S
+++ b/libc/arch-mips/syscalls/sendfile64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl sendfile64
     .align 4
@@ -8,16 +10,16 @@
 
 sendfile64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sendfile64
+    .cpload t9
+    li v0, __NR_sendfile64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sendfile64
diff --git a/libc/arch-mips/syscalls/sendmsg.S b/libc/arch-mips/syscalls/sendmsg.S
index faa4cf3ac..6806edaa3 100644
--- a/libc/arch-mips/syscalls/sendmsg.S
+++ b/libc/arch-mips/syscalls/sendmsg.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl sendmsg
     .align 4
@@ -8,16 +10,16 @@
 
 sendmsg:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sendmsg
+    .cpload t9
+    li v0, __NR_sendmsg
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sendmsg
diff --git a/libc/arch-mips/syscalls/sendto.S b/libc/arch-mips/syscalls/sendto.S
index 80a61100d..5e4435bce 100644
--- a/libc/arch-mips/syscalls/sendto.S
+++ b/libc/arch-mips/syscalls/sendto.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl sendto
     .align 4
@@ -8,16 +10,16 @@
 
 sendto:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sendto
+    .cpload t9
+    li v0, __NR_sendto
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sendto
diff --git a/libc/arch-mips/syscalls/setgid.S b/libc/arch-mips/syscalls/setgid.S
index 7e460b819..df08a949d 100644
--- a/libc/arch-mips/syscalls/setgid.S
+++ b/libc/arch-mips/syscalls/setgid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setgid
     .align 4
@@ -8,16 +10,16 @@
 
 setgid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setgid
+    .cpload t9
+    li v0, __NR_setgid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setgid
diff --git a/libc/arch-mips/syscalls/setgroups.S b/libc/arch-mips/syscalls/setgroups.S
index f89a4a434..9e7c1b7dd 100644
--- a/libc/arch-mips/syscalls/setgroups.S
+++ b/libc/arch-mips/syscalls/setgroups.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setgroups
     .align 4
@@ -8,16 +10,16 @@
 
 setgroups:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setgroups
+    .cpload t9
+    li v0, __NR_setgroups
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setgroups
diff --git a/libc/arch-mips/syscalls/setitimer.S b/libc/arch-mips/syscalls/setitimer.S
index 5a1850adf..5fab39da7 100644
--- a/libc/arch-mips/syscalls/setitimer.S
+++ b/libc/arch-mips/syscalls/setitimer.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setitimer
     .align 4
@@ -8,16 +10,16 @@
 
 setitimer:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setitimer
+    .cpload t9
+    li v0, __NR_setitimer
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setitimer
diff --git a/libc/arch-mips/syscalls/setns.S b/libc/arch-mips/syscalls/setns.S
index fd4529e73..4d5cdcb4b 100644
--- a/libc/arch-mips/syscalls/setns.S
+++ b/libc/arch-mips/syscalls/setns.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setns
     .align 4
@@ -8,16 +10,16 @@
 
 setns:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setns
+    .cpload t9
+    li v0, __NR_setns
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setns
diff --git a/libc/arch-mips/syscalls/setpgid.S b/libc/arch-mips/syscalls/setpgid.S
index d41e01c71..a19b225b7 100644
--- a/libc/arch-mips/syscalls/setpgid.S
+++ b/libc/arch-mips/syscalls/setpgid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setpgid
     .align 4
@@ -8,16 +10,16 @@
 
 setpgid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setpgid
+    .cpload t9
+    li v0, __NR_setpgid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setpgid
diff --git a/libc/arch-mips/syscalls/setpriority.S b/libc/arch-mips/syscalls/setpriority.S
index 443d017f4..5f23ea67c 100644
--- a/libc/arch-mips/syscalls/setpriority.S
+++ b/libc/arch-mips/syscalls/setpriority.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setpriority
     .align 4
@@ -8,16 +10,16 @@
 
 setpriority:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setpriority
+    .cpload t9
+    li v0, __NR_setpriority
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setpriority
diff --git a/libc/arch-mips/syscalls/setregid.S b/libc/arch-mips/syscalls/setregid.S
index a91e21bd4..1c6e7cde7 100644
--- a/libc/arch-mips/syscalls/setregid.S
+++ b/libc/arch-mips/syscalls/setregid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setregid
     .align 4
@@ -8,16 +10,16 @@
 
 setregid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setregid
+    .cpload t9
+    li v0, __NR_setregid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setregid
diff --git a/libc/arch-mips/syscalls/setresgid.S b/libc/arch-mips/syscalls/setresgid.S
index dd8a330ca..889dfdf65 100644
--- a/libc/arch-mips/syscalls/setresgid.S
+++ b/libc/arch-mips/syscalls/setresgid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setresgid
     .align 4
@@ -8,16 +10,16 @@
 
 setresgid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setresgid
+    .cpload t9
+    li v0, __NR_setresgid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setresgid
diff --git a/libc/arch-mips/syscalls/setresuid.S b/libc/arch-mips/syscalls/setresuid.S
index 1319e2cf4..3089d813c 100644
--- a/libc/arch-mips/syscalls/setresuid.S
+++ b/libc/arch-mips/syscalls/setresuid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setresuid
     .align 4
@@ -8,16 +10,16 @@
 
 setresuid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setresuid
+    .cpload t9
+    li v0, __NR_setresuid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setresuid
diff --git a/libc/arch-mips/syscalls/setreuid.S b/libc/arch-mips/syscalls/setreuid.S
index e25f2d9cc..782e7df69 100644
--- a/libc/arch-mips/syscalls/setreuid.S
+++ b/libc/arch-mips/syscalls/setreuid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setreuid
     .align 4
@@ -8,16 +10,16 @@
 
 setreuid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setreuid
+    .cpload t9
+    li v0, __NR_setreuid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setreuid
diff --git a/libc/arch-mips/syscalls/setrlimit.S b/libc/arch-mips/syscalls/setrlimit.S
index 65b1cd8b5..7e8afde20 100644
--- a/libc/arch-mips/syscalls/setrlimit.S
+++ b/libc/arch-mips/syscalls/setrlimit.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setrlimit
     .align 4
@@ -8,16 +10,16 @@
 
 setrlimit:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setrlimit
+    .cpload t9
+    li v0, __NR_setrlimit
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setrlimit
diff --git a/libc/arch-mips/syscalls/setsid.S b/libc/arch-mips/syscalls/setsid.S
index a0bad2b73..176c7bb07 100644
--- a/libc/arch-mips/syscalls/setsid.S
+++ b/libc/arch-mips/syscalls/setsid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setsid
     .align 4
@@ -8,16 +10,16 @@
 
 setsid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setsid
+    .cpload t9
+    li v0, __NR_setsid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setsid
diff --git a/libc/arch-mips/syscalls/setsockopt.S b/libc/arch-mips/syscalls/setsockopt.S
index 3192d93aa..9a2c24e14 100644
--- a/libc/arch-mips/syscalls/setsockopt.S
+++ b/libc/arch-mips/syscalls/setsockopt.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setsockopt
     .align 4
@@ -8,16 +10,16 @@
 
 setsockopt:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setsockopt
+    .cpload t9
+    li v0, __NR_setsockopt
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setsockopt
diff --git a/libc/arch-mips/syscalls/settimeofday.S b/libc/arch-mips/syscalls/settimeofday.S
index 673b7fdeb..32d28898e 100644
--- a/libc/arch-mips/syscalls/settimeofday.S
+++ b/libc/arch-mips/syscalls/settimeofday.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl settimeofday
     .align 4
@@ -8,16 +10,16 @@
 
 settimeofday:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_settimeofday
+    .cpload t9
+    li v0, __NR_settimeofday
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end settimeofday
diff --git a/libc/arch-mips/syscalls/setuid.S b/libc/arch-mips/syscalls/setuid.S
index abfdafb26..0c4c356c4 100644
--- a/libc/arch-mips/syscalls/setuid.S
+++ b/libc/arch-mips/syscalls/setuid.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setuid
     .align 4
@@ -8,16 +10,16 @@
 
 setuid:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setuid
+    .cpload t9
+    li v0, __NR_setuid
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setuid
diff --git a/libc/arch-mips/syscalls/setxattr.S b/libc/arch-mips/syscalls/setxattr.S
index b9c1aaacf..5cc21b635 100644
--- a/libc/arch-mips/syscalls/setxattr.S
+++ b/libc/arch-mips/syscalls/setxattr.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl setxattr
     .align 4
@@ -8,16 +10,16 @@
 
 setxattr:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_setxattr
+    .cpload t9
+    li v0, __NR_setxattr
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end setxattr
diff --git a/libc/arch-mips/syscalls/shutdown.S b/libc/arch-mips/syscalls/shutdown.S
index 0f2208ffc..a4f8aa2c2 100644
--- a/libc/arch-mips/syscalls/shutdown.S
+++ b/libc/arch-mips/syscalls/shutdown.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl shutdown
     .align 4
@@ -8,16 +10,16 @@
 
 shutdown:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_shutdown
+    .cpload t9
+    li v0, __NR_shutdown
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end shutdown
diff --git a/libc/arch-mips/syscalls/sigaltstack.S b/libc/arch-mips/syscalls/sigaltstack.S
index ec1d8a1ca..cd8538b7f 100644
--- a/libc/arch-mips/syscalls/sigaltstack.S
+++ b/libc/arch-mips/syscalls/sigaltstack.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl sigaltstack
     .align 4
@@ -8,16 +10,16 @@
 
 sigaltstack:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sigaltstack
+    .cpload t9
+    li v0, __NR_sigaltstack
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sigaltstack
diff --git a/libc/arch-mips/syscalls/signalfd4.S b/libc/arch-mips/syscalls/signalfd4.S
index 74e6168e2..2f6ea1ffc 100644
--- a/libc/arch-mips/syscalls/signalfd4.S
+++ b/libc/arch-mips/syscalls/signalfd4.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl signalfd4
     .align 4
@@ -8,16 +10,16 @@
 
 signalfd4:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_signalfd4
+    .cpload t9
+    li v0, __NR_signalfd4
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end signalfd4
diff --git a/libc/arch-mips/syscalls/socket.S b/libc/arch-mips/syscalls/socket.S
index c67404edc..b6bd45e57 100644
--- a/libc/arch-mips/syscalls/socket.S
+++ b/libc/arch-mips/syscalls/socket.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl socket
     .align 4
@@ -8,16 +10,16 @@
 
 socket:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_socket
+    .cpload t9
+    li v0, __NR_socket
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end socket
diff --git a/libc/arch-mips/syscalls/socketpair.S b/libc/arch-mips/syscalls/socketpair.S
index c0f41e250..ac15e1bc5 100644
--- a/libc/arch-mips/syscalls/socketpair.S
+++ b/libc/arch-mips/syscalls/socketpair.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl socketpair
     .align 4
@@ -8,16 +10,16 @@
 
 socketpair:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_socketpair
+    .cpload t9
+    li v0, __NR_socketpair
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end socketpair
diff --git a/libc/arch-mips/syscalls/swapoff.S b/libc/arch-mips/syscalls/swapoff.S
index 1ed5083ee..2f4a189ef 100644
--- a/libc/arch-mips/syscalls/swapoff.S
+++ b/libc/arch-mips/syscalls/swapoff.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl swapoff
     .align 4
@@ -8,16 +10,16 @@
 
 swapoff:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_swapoff
+    .cpload t9
+    li v0, __NR_swapoff
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end swapoff
diff --git a/libc/arch-mips/syscalls/swapon.S b/libc/arch-mips/syscalls/swapon.S
index 08a85b033..1b4084f81 100644
--- a/libc/arch-mips/syscalls/swapon.S
+++ b/libc/arch-mips/syscalls/swapon.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl swapon
     .align 4
@@ -8,16 +10,16 @@
 
 swapon:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_swapon
+    .cpload t9
+    li v0, __NR_swapon
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end swapon
diff --git a/libc/arch-mips/syscalls/symlinkat.S b/libc/arch-mips/syscalls/symlinkat.S
index 9c4324181..b146d13d1 100644
--- a/libc/arch-mips/syscalls/symlinkat.S
+++ b/libc/arch-mips/syscalls/symlinkat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl symlinkat
     .align 4
@@ -8,16 +10,16 @@
 
 symlinkat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_symlinkat
+    .cpload t9
+    li v0, __NR_symlinkat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end symlinkat
diff --git a/libc/arch-mips/syscalls/sync.S b/libc/arch-mips/syscalls/sync.S
index 0e0ee1fab..b9628fb6f 100644
--- a/libc/arch-mips/syscalls/sync.S
+++ b/libc/arch-mips/syscalls/sync.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl sync
     .align 4
@@ -8,16 +10,16 @@
 
 sync:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sync
+    .cpload t9
+    li v0, __NR_sync
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sync
diff --git a/libc/arch-mips/syscalls/sysinfo.S b/libc/arch-mips/syscalls/sysinfo.S
index 3acfbf78c..a5cad2f51 100644
--- a/libc/arch-mips/syscalls/sysinfo.S
+++ b/libc/arch-mips/syscalls/sysinfo.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl sysinfo
     .align 4
@@ -8,16 +10,16 @@
 
 sysinfo:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_sysinfo
+    .cpload t9
+    li v0, __NR_sysinfo
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end sysinfo
diff --git a/libc/arch-mips/syscalls/tgkill.S b/libc/arch-mips/syscalls/tgkill.S
index 5de33d05d..83eb957a0 100644
--- a/libc/arch-mips/syscalls/tgkill.S
+++ b/libc/arch-mips/syscalls/tgkill.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl tgkill
     .align 4
@@ -8,16 +10,16 @@
 
 tgkill:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_tgkill
+    .cpload t9
+    li v0, __NR_tgkill
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end tgkill
diff --git a/libc/arch-mips/syscalls/timerfd_create.S b/libc/arch-mips/syscalls/timerfd_create.S
index 252835567..9c4cc8f45 100644
--- a/libc/arch-mips/syscalls/timerfd_create.S
+++ b/libc/arch-mips/syscalls/timerfd_create.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 timerfd_create:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timerfd_create
+    .cpload t9
+    li v0, __NR_timerfd_create
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end timerfd_create
diff --git a/libc/arch-mips/syscalls/timerfd_gettime.S b/libc/arch-mips/syscalls/timerfd_gettime.S
index b38c2d4e9..d8165dca1 100644
--- a/libc/arch-mips/syscalls/timerfd_gettime.S
+++ b/libc/arch-mips/syscalls/timerfd_gettime.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 timerfd_gettime:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timerfd_gettime
+    .cpload t9
+    li v0, __NR_timerfd_gettime
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end timerfd_gettime
diff --git a/libc/arch-mips/syscalls/timerfd_settime.S b/libc/arch-mips/syscalls/timerfd_settime.S
index 11dc61bdf..29354ba91 100644
--- a/libc/arch-mips/syscalls/timerfd_settime.S
+++ b/libc/arch-mips/syscalls/timerfd_settime.S
@@ -1,6 +1,8 @@
 /* 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
@@ -8,16 +10,16 @@
 
 timerfd_settime:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_timerfd_settime
+    .cpload t9
+    li v0, __NR_timerfd_settime
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end timerfd_settime
diff --git a/libc/arch-mips/syscalls/times.S b/libc/arch-mips/syscalls/times.S
index 248a23fc9..d4a94e5cc 100644
--- a/libc/arch-mips/syscalls/times.S
+++ b/libc/arch-mips/syscalls/times.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl times
     .align 4
@@ -8,16 +10,16 @@
 
 times:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_times
+    .cpload t9
+    li v0, __NR_times
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end times
diff --git a/libc/arch-mips/syscalls/tkill.S b/libc/arch-mips/syscalls/tkill.S
index a80b506e9..9a15ac3bf 100644
--- a/libc/arch-mips/syscalls/tkill.S
+++ b/libc/arch-mips/syscalls/tkill.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl tkill
     .align 4
@@ -8,16 +10,16 @@
 
 tkill:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_tkill
+    .cpload t9
+    li v0, __NR_tkill
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end tkill
diff --git a/libc/arch-mips/syscalls/truncate.S b/libc/arch-mips/syscalls/truncate.S
index a4256dc6f..94bad296d 100644
--- a/libc/arch-mips/syscalls/truncate.S
+++ b/libc/arch-mips/syscalls/truncate.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl truncate
     .align 4
@@ -8,16 +10,16 @@
 
 truncate:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_truncate
+    .cpload t9
+    li v0, __NR_truncate
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end truncate
diff --git a/libc/arch-mips/syscalls/truncate64.S b/libc/arch-mips/syscalls/truncate64.S
index 9f48da0d5..a6b77cbff 100644
--- a/libc/arch-mips/syscalls/truncate64.S
+++ b/libc/arch-mips/syscalls/truncate64.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl truncate64
     .align 4
@@ -8,16 +10,16 @@
 
 truncate64:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_truncate64
+    .cpload t9
+    li v0, __NR_truncate64
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end truncate64
diff --git a/libc/arch-mips/syscalls/umask.S b/libc/arch-mips/syscalls/umask.S
index d74cf9047..92d79d7fb 100644
--- a/libc/arch-mips/syscalls/umask.S
+++ b/libc/arch-mips/syscalls/umask.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl umask
     .align 4
@@ -8,16 +10,16 @@
 
 umask:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_umask
+    .cpload t9
+    li v0, __NR_umask
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end umask
diff --git a/libc/arch-mips/syscalls/umount2.S b/libc/arch-mips/syscalls/umount2.S
index 6164f76c2..f78229737 100644
--- a/libc/arch-mips/syscalls/umount2.S
+++ b/libc/arch-mips/syscalls/umount2.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl umount2
     .align 4
@@ -8,16 +10,16 @@
 
 umount2:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_umount2
+    .cpload t9
+    li v0, __NR_umount2
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end umount2
diff --git a/libc/arch-mips/syscalls/uname.S b/libc/arch-mips/syscalls/uname.S
index a1051a24e..48ebe6b76 100644
--- a/libc/arch-mips/syscalls/uname.S
+++ b/libc/arch-mips/syscalls/uname.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl uname
     .align 4
@@ -8,16 +10,16 @@
 
 uname:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_uname
+    .cpload t9
+    li v0, __NR_uname
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end uname
diff --git a/libc/arch-mips/syscalls/unlinkat.S b/libc/arch-mips/syscalls/unlinkat.S
index 0ca77fe1b..7c361877e 100644
--- a/libc/arch-mips/syscalls/unlinkat.S
+++ b/libc/arch-mips/syscalls/unlinkat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl unlinkat
     .align 4
@@ -8,16 +10,16 @@
 
 unlinkat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_unlinkat
+    .cpload t9
+    li v0, __NR_unlinkat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end unlinkat
diff --git a/libc/arch-mips/syscalls/unshare.S b/libc/arch-mips/syscalls/unshare.S
index 592cc61d5..ae6272abd 100644
--- a/libc/arch-mips/syscalls/unshare.S
+++ b/libc/arch-mips/syscalls/unshare.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl unshare
     .align 4
@@ -8,16 +10,16 @@
 
 unshare:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_unshare
+    .cpload t9
+    li v0, __NR_unshare
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end unshare
diff --git a/libc/arch-mips/syscalls/utimensat.S b/libc/arch-mips/syscalls/utimensat.S
index 42fe4f9eb..86cba89fc 100644
--- a/libc/arch-mips/syscalls/utimensat.S
+++ b/libc/arch-mips/syscalls/utimensat.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl utimensat
     .align 4
@@ -8,16 +10,16 @@
 
 utimensat:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_utimensat
+    .cpload t9
+    li v0, __NR_utimensat
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end utimensat
diff --git a/libc/arch-mips/syscalls/wait4.S b/libc/arch-mips/syscalls/wait4.S
index 8c53eca58..fbff65172 100644
--- a/libc/arch-mips/syscalls/wait4.S
+++ b/libc/arch-mips/syscalls/wait4.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl wait4
     .align 4
@@ -8,16 +10,16 @@
 
 wait4:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_wait4
+    .cpload t9
+    li v0, __NR_wait4
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end wait4
diff --git a/libc/arch-mips/syscalls/write.S b/libc/arch-mips/syscalls/write.S
index 85fe4d045..5b02bae67 100644
--- a/libc/arch-mips/syscalls/write.S
+++ b/libc/arch-mips/syscalls/write.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl write
     .align 4
@@ -8,16 +10,16 @@
 
 write:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_write
+    .cpload t9
+    li v0, __NR_write
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end write
diff --git a/libc/arch-mips/syscalls/writev.S b/libc/arch-mips/syscalls/writev.S
index 4e23049b8..36e890e6d 100644
--- a/libc/arch-mips/syscalls/writev.S
+++ b/libc/arch-mips/syscalls/writev.S
@@ -1,6 +1,8 @@
 /* Generated by gensyscalls.py. Do not edit. */
 
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl writev
     .align 4
@@ -8,16 +10,16 @@
 
 writev:
     .set noreorder
-    .cpload $t9
-    li $v0, __NR_writev
+    .cpload t9
+    li v0, __NR_writev
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end writev
diff --git a/libc/tools/gensyscalls.py b/libc/tools/gensyscalls.py
index 6388ee18d..3c4810ad4 100755
--- a/libc/tools/gensyscalls.py
+++ b/libc/tools/gensyscalls.py
@@ -121,6 +121,8 @@ END(%(func)s)
 mips_call = "/* " + warning + " */\n" + \
 """
 #include <asm/unistd.h>
+#include <machine/asm.h>
+#include <machine/regdef.h>
     .text
     .globl %(func)s
     .align 4
@@ -128,16 +130,16 @@ mips_call = "/* " + warning + " */\n" + \
 
 %(func)s:
     .set noreorder
-    .cpload $t9
-    li $v0, %(__NR_name)s
+    .cpload t9
+    li v0, %(__NR_name)s
     syscall
-    bnez $a3, 1f
-    move $a0, $v0
-    j $ra
+    bnez a3, 1f
+    move a0, v0
+    j ra
     nop
 1:
-    la $t9,__set_errno
-    j $t9
+    la t9,__set_errno
+    j t9
     nop
     .set reorder
     .end %(func)s