Initial Contribution
diff --git a/libc/arch-x86/bionic/__get_sp.S b/libc/arch-x86/bionic/__get_sp.S
new file mode 100644
index 0000000..aeaaa66
--- /dev/null
+++ b/libc/arch-x86/bionic/__get_sp.S
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+    .text
+    .type __get_sp, @function
+    .global __get_sp
+    .align 4
+
+__get_sp:
+    mov  %esp, %eax
+    ret
diff --git a/libc/arch-x86/bionic/__get_tls.c b/libc/arch-x86/bionic/__get_tls.c
new file mode 100755
index 0000000..68dda86
--- /dev/null
+++ b/libc/arch-x86/bionic/__get_tls.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/* see the implementation of __set_tls and pthread.c to understand this
+ * code. Basically, the content of fs:[0] always is a pointer to the base
+ * address of the tls region
+ */
+void*   __get_tls(void)
+{
+  void*  tls;
+  asm ( "   movl  %%fs:0,%0" : "=r"(tls) );
+  return tls;
+}
diff --git a/libc/arch-x86/bionic/__set_tls.c b/libc/arch-x86/bionic/__set_tls.c
new file mode 100755
index 0000000..8dff8d7
--- /dev/null
+++ b/libc/arch-x86/bionic/__set_tls.c
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <pthread.h>
+
+struct user_desc {
+    unsigned int    entry_number;
+    unsigned long   base_addr;
+    unsigned int    limit;
+    unsigned int    seg_32bit:1;
+    unsigned int    contents:2;
+    unsigned int    read_exec_only:1;
+    unsigned int    limit_in_pages:1;
+    unsigned int    seg_not_present:1;
+    unsigned int    useable:1;
+    unsigned int    empty:25;
+};
+
+/* the following can't be const, since the first call will
+ * update the 'entry_number' field
+ */
+static struct user_desc  _tls_desc =
+{
+    -1,
+    0,
+    0x1000,
+    1,
+    0,
+    0,
+    1,
+    0,
+    1,
+    0
+};
+
+/* we implement thread local storage through the fs: segment descriptor
+ * we create a segment descriptor for the tls
+ */
+int __set_tls(void *ptr)
+{
+    int   rc, segment;
+
+    _tls_desc.base_addr = (unsigned long)ptr;
+
+    rc = __set_thread_area( &_tls_desc );
+    if (rc != 0)
+    {
+        /* could not set thread local area */
+        return -1;
+    }
+
+    /* this weird computation comes from GLibc */
+    segment = _tls_desc.entry_number*8 + 3;
+    asm __volatile__ (
+        "   movw %w0, %%fs" :: "r"(segment)
+    );
+    return 0;
+}
+
+
+
diff --git a/libc/arch-x86/bionic/atomics_x86.c b/libc/arch-x86/bionic/atomics_x86.c
new file mode 100644
index 0000000..b7b20e6
--- /dev/null
+++ b/libc/arch-x86/bionic/atomics_x86.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include <sys/atomics.h>
+
+#define FUTEX_SYSCALL 240
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+
+int __futex_wait(volatile void *ftx, int val)
+{
+    int ret;
+    asm volatile (
+        "int $0x80;"
+        : "=a" (ret)
+        : "0" (FUTEX_SYSCALL),
+          "b" (ftx),
+          "c" (FUTEX_WAIT),
+          "d" (val),
+          "S" (0)
+    );
+    return ret;
+}
+
+int __futex_wake(volatile void *ftx, int count)
+{
+    int ret;
+    asm volatile (
+        "int $0x80;"
+        : "=a" (ret)
+        : "0" (FUTEX_SYSCALL),
+          "b" (ftx),
+          "c" (FUTEX_WAKE),
+          "d" (count)
+    );
+    return ret;
+}
+
+int __atomic_cmpxchg(int old, int new, volatile int* addr) {
+    int xchg;
+    asm volatile (
+        "lock;"
+        "cmpxchg %%ecx, (%%edx);"
+        "setne %%al;"
+        : "=a" (xchg)
+        : "a" (old),
+          "c" (new),
+          "d" (addr)
+    );
+    return xchg;
+}
+
+int __atomic_swap(int new, volatile int* addr) {
+    int old;
+    asm volatile (
+        "lock;"
+        "xchg %%ecx, (%%edx);"
+        : "=c" (old)
+        : "c" (new),
+          "d" (addr)
+    );
+    return old;
+}
+
+int __atomic_dec(volatile int* addr) {
+    int old;
+    do {
+        old = *addr;
+    } while (atomic_cmpxchg(old, old-1, addr));
+    return old;
+}
+
+int __atomic_inc(volatile int* addr) {
+    int old;
+    do {
+        old = *addr;
+    } while (atomic_cmpxchg(old, old+1, addr));
+    return old;
+}
+
diff --git a/libc/arch-x86/include/endian.h b/libc/arch-x86/include/endian.h
new file mode 100644
index 0000000..ad37919
--- /dev/null
+++ b/libc/arch-x86/include/endian.h
@@ -0,0 +1,70 @@
+/*	$OpenBSD: endian.h,v 1.14 2005/12/13 00:35:23 millert Exp $	*/
+
+/*-
+ * Copyright (c) 1997 Niklas Hallqvist.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _I386_ENDIAN_H_
+#define _I386_ENDIAN_H_
+
+#ifdef __GNUC__
+
+#if defined(_KERNEL) && !defined(I386_CPU)
+#define	__swap32md(x) ({						\
+	u_int32_t __swap32md_x = (x);					\
+									\
+	__asm ("bswap %1" : "+r" (__swap32md_x));			\
+	__swap32md_x;							\
+})
+#else
+#define	__swap32md(x) ({						\
+	u_int32_t __swap32md_x = (x);					\
+									\
+	__asm ("rorw $8, %w1; rorl $16, %1; rorw $8, %w1" :		\
+	    "+r" (__swap32md_x));					\
+	__swap32md_x;							\
+})
+#endif	/* _KERNEL && !I386_CPU */
+
+#define	__swap64md(x) ({						\
+	u_int64_t __swap64md_x = (x);					\
+									\
+	(u_int64_t)__swap32md(__swap64md_x >> 32) |			\
+	    (u_int64_t)__swap32md(__swap64md_x & 0xffffffff) << 32;	\
+})
+#define	__swap16md(x) ({						\
+	u_int16_t __swap16md_x = (x);					\
+									\
+	__asm ("rorw $8, %w1" : "+r" (__swap16md_x));			\
+	__swap16md_x;							\
+})
+
+/* Tell sys/endian.h we have MD variants of the swap macros.  */
+#define MD_SWAP
+
+#endif	/* __GNUC__ */
+
+#define _BYTE_ORDER _LITTLE_ENDIAN
+#include <sys/endian.h>
+
+#endif /* _I386_ENDIAN_H_ */
diff --git a/libc/arch-x86/include/machine/_types.h b/libc/arch-x86/include/machine/_types.h
new file mode 100644
index 0000000..3a31e22
--- /dev/null
+++ b/libc/arch-x86/include/machine/_types.h
@@ -0,0 +1,123 @@
+/*	$OpenBSD: _types.h,v 1.2 2006/01/13 17:50:06 millert Exp $	*/
+
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)types.h	8.3 (Berkeley) 1/5/94
+ *	@(#)ansi.h	8.2 (Berkeley) 1/4/94
+ */
+
+#ifndef _I386__TYPES_H_
+#define _I386__TYPES_H_
+
+/* the kernel defines size_t as unsigned int, but g++ wants it to be unsigned long */
+#define _SIZE_T
+#define _PTRDIFF_T
+typedef unsigned int   size_t;
+typedef int            ptrdiff_t;
+
+#define _OFF_T_DEFINED_
+#define _SIZE_T_DEFINED_
+
+#include <linux/types.h>
+
+/* 7.18.1.1 Exact-width integer types */
+typedef	__signed char		__int8_t;
+typedef	unsigned char		__uint8_t;
+typedef	short			__int16_t;
+typedef	unsigned short		__uint16_t;
+typedef	int			__int32_t;
+typedef	unsigned int		__uint32_t;
+/* LONGLONG */
+typedef	long long		__int64_t;
+/* LONGLONG */
+typedef	unsigned long long	__uint64_t;
+
+/* 7.18.1.2 Minimum-width integer types */
+typedef	__int8_t		__int_least8_t;
+typedef	__uint8_t		__uint_least8_t;
+typedef	__int16_t		__int_least16_t;
+typedef	__uint16_t		__uint_least16_t;
+typedef	__int32_t		__int_least32_t;
+typedef	__uint32_t		__uint_least32_t;
+typedef	__int64_t		__int_least64_t;
+typedef	__uint64_t		__uint_least64_t;
+
+/* 7.18.1.3 Fastest minimum-width integer types */
+typedef	__int32_t		__int_fast8_t;
+typedef	__uint32_t		__uint_fast8_t;
+typedef	__int32_t		__int_fast16_t;
+typedef	__uint32_t		__uint_fast16_t;
+typedef	__int32_t		__int_fast32_t;
+typedef	__uint32_t		__uint_fast32_t;
+typedef	__int64_t		__int_fast64_t;
+typedef	__uint64_t		__uint_fast64_t;
+
+/* 7.18.1.4 Integer types capable of holding object pointers */
+typedef	int 			__intptr_t;
+typedef	unsigned int 	__uintptr_t;
+
+/* 7.18.1.5 Greatest-width integer types */
+typedef	__int64_t		__intmax_t;
+typedef	__uint64_t		__uintmax_t;
+
+/* Register size */
+typedef __int32_t		__register_t;
+
+/* VM system types */
+typedef unsigned long		__vaddr_t;
+typedef unsigned long		__paddr_t;
+typedef unsigned long		__vsize_t;
+typedef unsigned long		__psize_t;
+
+/* Standard system types */
+typedef int			__clock_t;
+typedef int			__clockid_t;
+typedef long			__ptrdiff_t;
+typedef	int			__time_t;
+typedef int			__timer_t;
+#if defined(__GNUC__) && __GNUC__ >= 3
+typedef	__builtin_va_list	__va_list;
+#else
+typedef	char *			__va_list;
+#endif
+
+/* Wide character support types */
+#ifndef __cplusplus
+typedef	int			__wchar_t;
+#endif
+typedef int			__wint_t;
+typedef	int			__rune_t;
+typedef	void *			__wctrans_t;
+typedef	void *			__wctype_t;
+
+/* Feature test macros */
+#define __HAVE_CPUINFO
+#define __HAVE_MUTEX
+
+#endif	/* _I386__TYPES_H_ */
diff --git a/libc/arch-x86/include/machine/asm.h b/libc/arch-x86/include/machine/asm.h
new file mode 100644
index 0000000..f2da575
--- /dev/null
+++ b/libc/arch-x86/include/machine/asm.h
@@ -0,0 +1,112 @@
+/*	$OpenBSD: asm.h,v 1.8 2004/06/13 21:49:16 niklas Exp $	*/
+/*	$NetBSD: asm.h,v 1.7 1994/10/27 04:15:56 cgd Exp $	*/
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * William Jolitz.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)asm.h	5.5 (Berkeley) 5/7/91
+ */
+
+#ifndef _I386_ASM_H_
+#define _I386_ASM_H_
+
+#ifdef PIC
+#define PIC_PROLOGUE	\
+	pushl	%ebx;	\
+	call	666f;	\
+666:			\
+	popl	%ebx;	\
+	addl	$_C_LABEL(_GLOBAL_OFFSET_TABLE_)+[.-666b], %ebx
+#define PIC_EPILOGUE	\
+	popl	%ebx
+#define PIC_PLT(x)	x@PLT
+#define PIC_GOT(x)	x@GOT(%ebx)
+#define PIC_GOTOFF(x)	x@GOTOFF(%ebx)
+#else
+#define PIC_PROLOGUE
+#define PIC_EPILOGUE
+#define PIC_PLT(x)	x
+#define PIC_GOT(x)	x
+#define PIC_GOTOFF(x)	x
+#endif
+
+#define _C_LABEL(name)	name
+#define	_ASM_LABEL(x)	x
+
+#define CVAROFF(x, y)	_C_LABEL(x) + y
+
+#ifdef __STDC__
+# define __CONCAT(x,y)	x ## y
+# define __STRING(x)	#x
+#else
+# define __CONCAT(x,y)	x/**/y
+# define __STRING(x)	"x"
+#endif
+
+/*
+ * WEAK ALIAS: create a weak alias
+ */
+#define WEAK_ALIAS(alias,sym) \
+	.weak alias; \
+	alias = sym
+
+/*
+ * WARN_REFERENCES: create a warning if the specified symbol is referenced
+ */
+#define WARN_REFERENCES(_sym,_msg)	\
+	.section .gnu.warning. ## _sym ; .ascii _msg ; .text
+
+/* let kernels and others override entrypoint alignment */
+#ifndef _ALIGN_TEXT
+# define _ALIGN_TEXT .align 2, 0x90
+#endif
+
+#define _ENTRY(x) \
+	.text; _ALIGN_TEXT; .globl x; .type x,@function; x:
+
+#ifdef GPROF
+# define _PROF_PROLOGUE	\
+	pushl %ebp; movl %esp,%ebp; call PIC_PLT(mcount); popl %ebp
+#else
+# define _PROF_PROLOGUE
+#endif
+
+#define	ENTRY(y)	_ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
+#define	NENTRY(y)	_ENTRY(_C_LABEL(y))
+#define	ASENTRY(y)	_ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
+
+#define	ALTENTRY(name)	.globl _C_LABEL(name); _C_LABEL(name):
+
+#define	ASMSTR		.asciz
+
+#define RCSID(x)	.text; .asciz x
+
+#endif /* !_I386_ASM_H_ */
diff --git a/libc/arch-x86/include/machine/cdefs.h b/libc/arch-x86/include/machine/cdefs.h
new file mode 100644
index 0000000..6efee6a
--- /dev/null
+++ b/libc/arch-x86/include/machine/cdefs.h
@@ -0,0 +1,24 @@
+/*	$OpenBSD: cdefs.h,v 1.9 2005/11/24 20:46:45 deraadt Exp $	*/
+
+/*
+ * Written by J.T. Conklin <jtc@wimsey.com> 01/17/95.
+ * Public domain.
+ */
+
+#ifndef	_MACHINE_CDEFS_H_
+#define	_MACHINE_CDEFS_H_
+
+#if defined(lint)
+#define __indr_reference(sym,alias)	__lint_equal__(sym,alias)
+#define __warn_references(sym,msg)
+#define __weak_alias(alias,sym)		__lint_equal__(sym,alias)
+#elif defined(__GNUC__) && defined(__STDC__)
+#define __weak_alias(alias,sym)				\
+	__asm__(".weak " __STRING(alias) " ; "		\
+	    __STRING(alias) " = " __STRING(sym));
+#define __warn_references(sym,msg)			\
+	__asm__(".section .gnu.warning." __STRING(sym)	\
+	    " ; .ascii \"" msg "\" ; .text");
+#endif
+
+#endif /* !_MACHINE_CDEFS_H_ */
diff --git a/libc/arch-x86/include/machine/exec.h b/libc/arch-x86/include/machine/exec.h
new file mode 100644
index 0000000..d091741
--- /dev/null
+++ b/libc/arch-x86/include/machine/exec.h
@@ -0,0 +1,51 @@
+/*	$OpenBSD: exec.h,v 1.9 2003/04/17 03:42:14 drahn Exp $	*/
+/*	$NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $	*/
+
+/*
+ * Copyright (c) 1993 Christopher G. Demetriou
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _I386_EXEC_H_
+#define _I386_EXEC_H_
+
+#define __LDPGSZ	4096
+
+#define NATIVE_EXEC_ELF
+
+#define ARCH_ELFSIZE		32
+
+#define ELF_TARG_CLASS		ELFCLASS32
+#define ELF_TARG_DATA		ELFDATA2LSB
+#define ELF_TARG_MACH		EM_386 /* XXX - EM_486 is currently unused
+                                          by all OSs/compilers/linkers */
+
+#define _NLIST_DO_AOUT
+#define _NLIST_DO_ELF
+
+#define _KERN_DO_AOUT
+#define _KERN_DO_ELF
+
+#endif  /* _I386_EXEC_H_ */
diff --git a/libc/arch-x86/include/machine/ieee.h b/libc/arch-x86/include/machine/ieee.h
new file mode 100644
index 0000000..55b3703
--- /dev/null
+++ b/libc/arch-x86/include/machine/ieee.h
@@ -0,0 +1,133 @@
+/*	$OpenBSD: ieee.h,v 1.2 2003/06/02 23:27:47 millert Exp $ */
+/*	$NetBSD: ieee.h,v 1.1 1996/09/30 16:34:25 ws Exp $ */
+
+/*
+ * Copyright (c) 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This software was developed by the Computer Systems Engineering group
+ * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
+ * contributed to Berkeley.
+ *
+ * All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Lawrence Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ieee.h	8.1 (Berkeley) 6/11/93
+ */
+
+/*
+ * ieee.h defines the machine-dependent layout of the machine's IEEE
+ * floating point.  It does *not* define (yet?) any of the rounding
+ * mode bits, exceptions, and so forth.
+ */
+
+/*
+ * Define the number of bits in each fraction and exponent.
+ *
+ *		     k	         k+1
+ * Note that  1.0 x 2  == 0.1 x 2      and that denorms are represented
+ *
+ *					  (-exp_bias+1)
+ * as fractions that look like 0.fffff x 2             .  This means that
+ *
+ *			 -126
+ * the number 0.10000 x 2    , for instance, is the same as the normalized
+ *
+ *		-127			   -128
+ * float 1.0 x 2    .  Thus, to represent 2    , we need one leading zero
+ *
+ *				  -129
+ * in the fraction; to represent 2    , we need two, and so on.  This
+ *
+ *						     (-exp_bias-fracbits+1)
+ * implies that the smallest denormalized number is 2
+ *
+ * for whichever format we are talking about: for single precision, for
+ *
+ *						-126		-149
+ * instance, we get .00000000000000000000001 x 2    , or 1.0 x 2    , and
+ *
+ * -149 == -127 - 23 + 1.
+ */
+#define	SNG_EXPBITS	8
+#define	SNG_FRACBITS	23
+
+#define	DBL_EXPBITS	11
+#define	DBL_FRACBITS	52
+
+#define	EXT_EXPBITS	15
+#define	EXT_FRACBITS	112
+
+struct ieee_single {
+	u_int	sng_frac:23;
+	u_int	sng_exp:8;
+	u_int	sng_sign:1;
+};
+
+struct ieee_double {
+	u_int	dbl_fracl;
+	u_int	dbl_frach:20;
+	u_int	dbl_exp:11;
+	u_int	dbl_sign:1;
+};
+
+struct ieee_ext {
+	u_int	ext_fracl;
+	u_int	ext_fraclm;
+	u_int	ext_frachm;
+	u_int	ext_frach:16;
+	u_int	ext_exp:15;
+	u_int	ext_sign:1;
+};
+
+/*
+ * Floats whose exponent is in [1..INFNAN) (of whatever type) are
+ * `normal'.  Floats whose exponent is INFNAN are either Inf or NaN.
+ * Floats whose exponent is zero are either zero (iff all fraction
+ * bits are zero) or subnormal values.
+ *
+ * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its
+ * high fraction; if the bit is set, it is a `quiet NaN'.
+ */
+#define	SNG_EXP_INFNAN	255
+#define	DBL_EXP_INFNAN	2047
+#define	EXT_EXP_INFNAN	32767
+
+#if 0
+#define	SNG_QUIETNAN	(1 << 22)
+#define	DBL_QUIETNAN	(1 << 19)
+#define	EXT_QUIETNAN	(1 << 15)
+#endif
+
+/*
+ * Exponent biases.
+ */
+#define	SNG_EXP_BIAS	127
+#define	DBL_EXP_BIAS	1023
+#define	EXT_EXP_BIAS	16383
diff --git a/libc/arch-x86/include/machine/internal_types.h b/libc/arch-x86/include/machine/internal_types.h
new file mode 100644
index 0000000..4d1833c
--- /dev/null
+++ b/libc/arch-x86/include/machine/internal_types.h
@@ -0,0 +1,6 @@
+/* $OpenBSD: internal_types.h,v 1.1 2002/04/24 21:53:11 espie Exp $ */
+/* Public domain */
+#ifndef _MACHINE_INTERNAL_TYPES_H_
+#define _MACHINE_INTERNAL_TYPES_H_
+
+#endif
diff --git a/libc/arch-x86/include/machine/limits.h b/libc/arch-x86/include/machine/limits.h
new file mode 100644
index 0000000..86fd854
--- /dev/null
+++ b/libc/arch-x86/include/machine/limits.h
@@ -0,0 +1,63 @@
+/*	$OpenBSD: limits.h,v 1.11 2006/01/06 22:48:47 millert Exp $	*/
+/*	$NetBSD: limits.h,v 1.11 1995/12/21 01:08:59 mycroft Exp $	*/
+
+/*
+ * Copyright (c) 1988 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)limits.h	7.2 (Berkeley) 6/28/90
+ */
+
+#ifndef _MACHINE_LIMITS_H_
+#define _MACHINE_LIMITS_H_
+
+#include <sys/cdefs.h>
+
+#define	MB_LEN_MAX	1		/* no multibyte characters */
+
+#ifndef	SIZE_MAX
+#define	SIZE_MAX	UINT_MAX	/* max value for a size_t */
+#endif
+#ifndef SSIZE_MAX
+#define	SSIZE_MAX	INT_MAX		/* max value for a ssize_t */
+#endif
+
+#if __BSD_VISIBLE
+#define	SIZE_T_MAX	UINT_MAX	/* max value for a size_t (historic) */
+
+#define	UQUAD_MAX	0xffffffffffffffffULL		/* max unsigned quad */
+#define	QUAD_MAX	0x7fffffffffffffffLL		/* max signed quad */
+#define	QUAD_MIN	(-0x7fffffffffffffffLL-1)	/* min signed quad */
+
+#endif /* __BSD_VISIBLE */
+
+#define LONGLONG_BIT    64
+#define LONGLONG_MIN    (-9223372036854775807LL-1)
+#define LONGLONG_MAX    9223372036854775807LL
+#define ULONGLONG_MAX   18446744073709551615ULL
+
+#endif /* _MACHINE_LIMITS_H_ */
diff --git a/libc/arch-x86/include/machine/setjmp.h b/libc/arch-x86/include/machine/setjmp.h
new file mode 100644
index 0000000..ded095d
--- /dev/null
+++ b/libc/arch-x86/include/machine/setjmp.h
@@ -0,0 +1,8 @@
+/*	$OpenBSD: setjmp.h,v 1.2 2000/08/05 22:07:32 niklas Exp $	*/
+/*	$NetBSD: setjmp.h,v 1.1 1994/12/20 10:36:43 cgd Exp $	*/
+
+/*
+ * machine/setjmp.h: machine dependent setjmp-related information.
+ */
+
+#define	_JBLEN	10		/* size, in longs, of a jmp_buf */
diff --git a/libc/arch-x86/string/bcmp.S b/libc/arch-x86/string/bcmp.S
new file mode 100644
index 0000000..a5b46ae
--- /dev/null
+++ b/libc/arch-x86/string/bcmp.S
@@ -0,0 +1,32 @@
+/*	$OpenBSD: bcmp.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+ENTRY(bcmp)
+	pushl	%edi
+	pushl	%esi
+	movl	12(%esp),%edi
+	movl	16(%esp),%esi
+	xorl	%eax,%eax		/* clear return value */
+	cld				/* set compare direction forward */
+
+	movl	20(%esp),%ecx		/* compare by words */
+	shrl	$2,%ecx
+	repe
+	cmpsl
+	jne	L1
+
+	movl	20(%esp),%ecx		/* compare remainder by bytes */
+	andl	$3,%ecx
+	repe
+	cmpsb
+	je	L2
+
+L1:	incl	%eax
+L2:	popl	%esi
+	popl	%edi
+	ret
diff --git a/libc/arch-x86/string/bcopy.S b/libc/arch-x86/string/bcopy.S
new file mode 100644
index 0000000..dde5ae1
--- /dev/null
+++ b/libc/arch-x86/string/bcopy.S
@@ -0,0 +1,93 @@
+/*	$OpenBSD: bcopy.S,v 1.5 2005/08/07 11:30:38 espie Exp $	*/
+
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from locore.s.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <machine/asm.h>
+
+	/*
+	 * (ov)bcopy (src,dst,cnt)
+	 *  ws@tools.de     (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
+	 */
+
+#ifdef MEMCOPY
+ENTRY(memcpy)
+#else
+#ifdef MEMMOVE
+ENTRY(memmove)
+#else
+ENTRY(bcopy)
+#endif
+#endif
+	pushl	%esi
+	pushl	%edi
+#if defined(MEMCOPY) || defined(MEMMOVE)
+	movl	12(%esp),%edi
+	movl	16(%esp),%esi
+	movl	%edi, %eax
+#else
+	movl	12(%esp),%esi
+	movl	16(%esp),%edi
+#endif
+	movl	20(%esp),%ecx
+	movl	%ecx,%edx
+	cmpl	%esi,%edi	/* potentially overlapping? */
+	jnb	1f
+	cld			/* nope, copy forwards. */
+	shrl	$2,%ecx		/* copy by words */
+	rep
+	movsl
+	movl	%edx,%ecx
+	andl	$3,%ecx		/* any bytes left? */
+	rep
+	movsb
+	popl	%edi
+	popl	%esi
+	ret
+1:
+	addl	%ecx,%edi	/* copy backwards. */
+	addl	%ecx,%esi
+	std
+	andl	$3,%ecx		/* any fractional bytes? */
+	decl	%edi
+	decl	%esi
+	rep
+	movsb
+	movl	%edx,%ecx
+	shrl	$2,%ecx
+	subl	$3,%esi
+	subl	$3,%edi
+	rep
+	movsl
+	popl	%edi
+	popl	%esi
+	cld
+	ret
diff --git a/libc/arch-x86/string/bzero.S b/libc/arch-x86/string/bzero.S
new file mode 100644
index 0000000..2ec9c7d
--- /dev/null
+++ b/libc/arch-x86/string/bzero.S
@@ -0,0 +1,43 @@
+/*	$OpenBSD: bzero.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+ENTRY(bzero)
+	pushl	%edi
+	movl	8(%esp),%edi
+	movl	12(%esp),%edx
+
+	cld				/* set fill direction forward */
+	xorl	%eax,%eax		/* set fill data to 0 */
+
+	/*
+	 * if the string is too short, it's really not worth the overhead
+	 * of aligning to word boundries, etc.  So we jump to a plain
+	 * unaligned set.
+	 */
+	cmpl	$16,%edx
+	jb	L1
+
+	movl	%edi,%ecx		/* compute misalignment */
+	negl	%ecx
+	andl	$3,%ecx
+	subl	%ecx,%edx
+	rep				/* zero until word aligned */
+	stosb
+
+	movl	%edx,%ecx		/* zero by words */
+	shrl	$2,%ecx
+	andl	$3,%edx
+	rep
+	stosl
+
+L1:	movl	%edx,%ecx		/* zero remainder by bytes */
+	rep
+	stosb
+
+	popl	%edi
+	ret
diff --git a/libc/arch-x86/string/fss.S b/libc/arch-x86/string/fss.S
new file mode 100644
index 0000000..96affab
--- /dev/null
+++ b/libc/arch-x86/string/fss.S
@@ -0,0 +1,17 @@
+/*	$OpenBSD: ffs.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+ENTRY(ffs)
+	bsfl	4(%esp),%eax
+	jz	L1	 		/* ZF is set if all bits are 0 */
+	incl	%eax			/* bits numbered from 1, not 0 */
+	ret
+
+	.align 2
+L1:	xorl	%eax,%eax		/* clear result */
+	ret
diff --git a/libc/arch-x86/string/index.S b/libc/arch-x86/string/index.S
new file mode 100644
index 0000000..7f83ef5
--- /dev/null
+++ b/libc/arch-x86/string/index.S
@@ -0,0 +1,26 @@
+/*	$OpenBSD: index.S,v 1.4 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+#ifdef STRCHR
+ENTRY(strchr)
+#else
+ENTRY(index)
+#endif
+	movl	4(%esp),%eax
+	movb	8(%esp),%cl
+	.align 2,0x90
+L1:
+	movb	(%eax),%dl
+	cmpb	%dl,%cl			/* found char??? */
+	je 	L2
+	incl	%eax
+	testb	%dl,%dl			/* null terminator??? */
+	jnz	L1
+	xorl	%eax,%eax
+L2:
+	ret
diff --git a/libc/arch-x86/string/memchr.S b/libc/arch-x86/string/memchr.S
new file mode 100644
index 0000000..d6bcbe6
--- /dev/null
+++ b/libc/arch-x86/string/memchr.S
@@ -0,0 +1,26 @@
+/*	$OpenBSD: memchr.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+ENTRY(memchr)
+	pushl	%edi
+	movl	8(%esp),%edi		/* string address */
+	movl	12(%esp),%eax		/* set character to search for */
+	movl	16(%esp),%ecx		/* set length of search */
+	testl	%ecx,%ecx		/* test for len == 0 */
+	jz	L1
+	cld				/* set search forward */
+	repne				/* search! */
+	scasb
+	jne	L1			/* scan failed, return null */
+	leal	-1(%edi),%eax		/* adjust result of scan */
+	popl	%edi
+	ret
+	.align 2,0x90
+L1:	xorl	%eax,%eax
+	popl	%edi
+	ret
diff --git a/libc/arch-x86/string/memcmp.S b/libc/arch-x86/string/memcmp.S
new file mode 100644
index 0000000..1be189a
--- /dev/null
+++ b/libc/arch-x86/string/memcmp.S
@@ -0,0 +1,43 @@
+/*	$OpenBSD: memcmp.S,v 1.4 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+ENTRY(memcmp)
+	pushl	%edi
+	pushl	%esi
+	movl	12(%esp),%edi
+	movl	16(%esp),%esi
+	cld				/* set compare direction forward */
+
+	movl	20(%esp),%ecx		/* compare by words */
+	shrl	$2,%ecx
+	repe
+	cmpsl
+	jne	L5			/* do we match so far? */
+
+	movl	20(%esp),%ecx		/* compare remainder by bytes */
+	andl	$3,%ecx
+	repe
+	cmpsb
+	jne	L6			/* do we match? */
+
+	xorl	%eax,%eax		/* we match, return zero	*/
+	popl	%esi
+	popl	%edi
+	ret
+
+L5:	movl	$4,%ecx			/* We know that one of the next	*/
+	subl	%ecx,%edi		/* four pairs of bytes do not	*/
+	subl	%ecx,%esi		/* match.			*/
+	repe
+	cmpsb
+L6:	movzbl  -1(%edi),%eax		/* Perform unsigned comparison	*/
+	movzbl	-1(%esi),%edx
+	subl	%edx,%eax
+	popl	%esi
+	popl	%edi
+	ret
diff --git a/libc/arch-x86/string/memcpy.S b/libc/arch-x86/string/memcpy.S
new file mode 100644
index 0000000..95c8a83
--- /dev/null
+++ b/libc/arch-x86/string/memcpy.S
@@ -0,0 +1,3 @@
+/*	$OpenBSD: memcpy.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+#define MEMCOPY
+#include "bcopy.S"
diff --git a/libc/arch-x86/string/memmove.S b/libc/arch-x86/string/memmove.S
new file mode 100644
index 0000000..c5bfd19
--- /dev/null
+++ b/libc/arch-x86/string/memmove.S
@@ -0,0 +1,3 @@
+/*	$OpenBSD: memmove.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+#define MEMMOVE
+#include "bcopy.S"
diff --git a/libc/arch-x86/string/memset.S b/libc/arch-x86/string/memset.S
new file mode 100644
index 0000000..1059ccc
--- /dev/null
+++ b/libc/arch-x86/string/memset.S
@@ -0,0 +1,55 @@
+/*	$OpenBSD: memset.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+ENTRY(memset)
+	pushl	%edi
+	pushl	%ebx
+	movl	12(%esp),%edi
+	movzbl	16(%esp),%eax		/* unsigned char, zero extend */
+	movl	20(%esp),%ecx
+	pushl	%edi			/* push address of buffer */
+
+	cld				/* set fill direction forward */
+
+	/*
+	 * if the string is too short, it's really not worth the overhead
+	 * of aligning to word boundries, etc.  So we jump to a plain
+	 * unaligned set.
+	 */
+	cmpl	$0x0f,%ecx
+	jle	L1
+
+	movb	%al,%ah			/* copy char to all bytes in word */
+	movl	%eax,%edx
+	sall	$16,%eax
+	orl	%edx,%eax
+
+	movl	%edi,%edx		/* compute misalignment */
+	negl	%edx
+	andl	$3,%edx
+	movl	%ecx,%ebx
+	subl	%edx,%ebx
+
+	movl	%edx,%ecx		/* set until word aligned */
+	rep
+	stosb
+
+	movl	%ebx,%ecx
+	shrl	$2,%ecx			/* set by words */
+	rep
+	stosl
+
+	movl	%ebx,%ecx		/* set remainder by bytes */
+	andl	$3,%ecx
+L1:	rep
+	stosb
+
+	popl	%eax			/* pop address of buffer */
+	popl	%ebx
+	popl	%edi
+	ret
diff --git a/libc/arch-x86/string/rindex.S b/libc/arch-x86/string/rindex.S
new file mode 100644
index 0000000..0260d38
--- /dev/null
+++ b/libc/arch-x86/string/rindex.S
@@ -0,0 +1,29 @@
+/*	$OpenBSD: rindex.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+#ifdef STRRCHR
+ENTRY(strrchr)
+#else
+ENTRY(rindex)
+#endif
+	pushl	%ebx
+	movl	8(%esp),%edx
+	movb	12(%esp),%cl
+	xorl	%eax,%eax		/* init pointer to null */
+	.align 2,0x90
+L1:
+	movb	(%edx),%bl
+	cmpb	%bl,%cl
+	jne	L2
+	movl	%edx,%eax
+L2:
+	incl	%edx
+	testb	%bl,%bl			/* null terminator??? */
+	jnz	L1
+	popl	%ebx
+	ret
diff --git a/libc/arch-x86/string/strcat.S b/libc/arch-x86/string/strcat.S
new file mode 100644
index 0000000..60fdd55
--- /dev/null
+++ b/libc/arch-x86/string/strcat.S
@@ -0,0 +1,73 @@
+/*	$OpenBSD: strcat.S,v 1.8 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+#if defined(APIWARN)
+#APP
+	.section .gnu.warning.strcat
+	.ascii "warning: strcat() is almost always misused, please use strlcat()"
+#NO_APP
+#endif
+
+/*
+ * NOTE: I've unrolled the loop eight times: large enough to make a
+ * significant difference, and small enough not to totally trash the
+ * cache.
+ */
+
+ENTRY(strcat)
+	pushl	%edi			/* save edi */
+	movl	8(%esp),%edi		/* dst address */
+	movl	12(%esp),%edx		/* src address */
+	pushl	%edi			/* push destination address */
+
+	cld				/* set search forward */
+	xorl	%eax,%eax		/* set search for null terminator */
+	movl	$-1,%ecx		/* set search for lots of characters */
+	repne				/* search! */
+	scasb
+
+	leal	-1(%edi),%ecx		/* correct dst address */
+
+	.align 2,0x90
+L1:	movb	(%edx),%al		/* unroll loop, but not too much */
+	movb	%al,(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	1(%edx),%al
+	movb	%al,1(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	2(%edx),%al
+	movb	%al,2(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	3(%edx),%al
+	movb	%al,3(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	4(%edx),%al
+	movb	%al,4(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	5(%edx),%al
+	movb	%al,5(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	6(%edx),%al
+	movb	%al,6(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	7(%edx),%al
+	movb	%al,7(%ecx)
+	addl	$8,%edx
+	addl	$8,%ecx
+	testb	%al,%al
+	jnz	L1
+L2:	popl	%eax			/* pop destination address */
+	popl	%edi			/* restore edi */
+	ret
diff --git a/libc/arch-x86/string/strchr.S b/libc/arch-x86/string/strchr.S
new file mode 100644
index 0000000..f76e593
--- /dev/null
+++ b/libc/arch-x86/string/strchr.S
@@ -0,0 +1,3 @@
+/*	$OpenBSD: strchr.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+#define STRCHR
+#include "index.S"
diff --git a/libc/arch-x86/string/strcmp.S b/libc/arch-x86/string/strcmp.S
new file mode 100644
index 0000000..22ba546
--- /dev/null
+++ b/libc/arch-x86/string/strcmp.S
@@ -0,0 +1,81 @@
+/*	$OpenBSD: strcmp.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+/*
+ * NOTE: I've unrolled the loop eight times: large enough to make a
+ * significant difference, and small enough not to totally trash the
+ * cache.
+ */
+
+ENTRY(strcmp)
+	movl	0x04(%esp),%eax
+	movl	0x08(%esp),%edx
+	jmp	L2			/* Jump into the loop! */
+
+	.align	2,0x90
+L1:	incl	%eax
+	incl	%edx
+L2:	movb	(%eax),%cl
+	testb	%cl,%cl			/* null terminator??? */
+	jz	L3
+	cmpb	%cl,(%edx)		/* chars match??? */
+	jne	L3
+	incl	%eax
+	incl	%edx
+	movb	(%eax),%cl
+	testb	%cl,%cl
+	jz	L3
+	cmpb	%cl,(%edx)
+	jne	L3
+	incl	%eax
+	incl	%edx
+	movb	(%eax),%cl
+	testb	%cl,%cl
+	jz	L3
+	cmpb	%cl,(%edx)
+	jne	L3
+	incl	%eax
+	incl	%edx
+	movb	(%eax),%cl
+	testb	%cl,%cl
+	jz	L3
+	cmpb	%cl,(%edx)
+	jne	L3
+	incl	%eax
+	incl	%edx
+	movb	(%eax),%cl
+	testb	%cl,%cl
+	jz	L3
+	cmpb	%cl,(%edx)
+	jne	L3
+	incl	%eax
+	incl	%edx
+	movb	(%eax),%cl
+	testb	%cl,%cl
+	jz	L3
+	cmpb	%cl,(%edx)
+	jne	L3
+	incl	%eax
+	incl	%edx
+	movb	(%eax),%cl
+	testb	%cl,%cl
+	jz	L3
+	cmpb	%cl,(%edx)
+	jne	L3
+	incl	%eax
+	incl	%edx
+	movb	(%eax),%cl
+	testb	%cl,%cl
+	jz	L3
+	cmpb	%cl,(%edx)
+	je	L1
+	.align 2, 0x90
+L3:	movzbl	(%eax),%eax		/* unsigned comparison */
+	movzbl	(%edx),%edx
+	subl	%edx,%eax
+	ret
diff --git a/libc/arch-x86/string/strcpy.S b/libc/arch-x86/string/strcpy.S
new file mode 100644
index 0000000..341eb6c
--- /dev/null
+++ b/libc/arch-x86/string/strcpy.S
@@ -0,0 +1,63 @@
+/*	$OpenBSD: strcpy.S,v 1.8 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+#if defined(APIWARN)
+#APP
+	.section .gnu.warning.strcpy
+	.ascii "warning: strcpy() is almost always misused, please use strlcpy()"
+#NO_APP
+#endif
+
+/*
+ * NOTE: I've unrolled the loop eight times: large enough to make a
+ * significant difference, and small enough not to totally trash the
+ * cache.
+ */
+
+ENTRY(strcpy)
+	movl	4(%esp),%ecx		/* dst address */
+	movl	8(%esp),%edx		/* src address */
+	pushl	%ecx			/* push dst address */
+
+	.align 2,0x90
+L1:	movb	(%edx),%al		/* unroll loop, but not too much */
+	movb	%al,(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	1(%edx),%al
+	movb	%al,1(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	2(%edx),%al
+	movb	%al,2(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	3(%edx),%al
+	movb	%al,3(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	4(%edx),%al
+	movb	%al,4(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	5(%edx),%al
+	movb	%al,5(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	6(%edx),%al
+	movb	%al,6(%ecx)
+	testb	%al,%al
+	jz	L2
+	movb	7(%edx),%al
+	movb	%al,7(%ecx)
+	addl	$8,%edx
+	addl	$8,%ecx
+	testb	%al,%al
+	jnz	L1
+L2:	popl	%eax			/* pop dst address */
+	ret
diff --git a/libc/arch-x86/string/strlen.S b/libc/arch-x86/string/strlen.S
new file mode 100644
index 0000000..4f04ffc
--- /dev/null
+++ b/libc/arch-x86/string/strlen.S
@@ -0,0 +1,20 @@
+/*	$OpenBSD: strlen.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+ENTRY(strlen)
+	pushl	%edi
+	movl	8(%esp),%edi		/* string address */
+	cld				/* set search forward */
+	xorl	%eax,%eax		/* set search for null terminator */
+	movl	$-1,%ecx		/* set search for lots of characters */
+	repne				/* search! */
+	scasb
+	notl	%ecx			/* get length by taking	complement */
+	leal	-1(%ecx),%eax		/* and subtracting one */
+	popl	%edi
+	ret
diff --git a/libc/arch-x86/string/strncmp.S b/libc/arch-x86/string/strncmp.S
new file mode 100644
index 0000000..5aa88d7
--- /dev/null
+++ b/libc/arch-x86/string/strncmp.S
@@ -0,0 +1,113 @@
+/*	$OpenBSD: strncmp.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+/*
+ * NOTE: I've unrolled the loop eight times: large enough to make a
+ * significant difference, and small enough not to totally trash the
+ * cache.
+ */
+
+ENTRY(strncmp)
+	pushl	%ebx
+	movl	8(%esp),%eax
+	movl	12(%esp),%ecx
+	movl	16(%esp),%edx
+	testl	%edx,%edx
+	jmp	L2			/* Jump into the loop! */
+
+	.align 2,0x90
+L1:	incl	%eax
+	incl	%ecx
+	decl	%edx
+L2:	jz	L4			/* strings are equal */
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	jne	L3
+
+	incl	%eax
+	incl	%ecx
+	decl	%edx
+	jz	L4
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	jne	L3
+
+	incl	%eax
+	incl	%ecx
+	decl	%edx
+	jz	L4
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	jne	L3
+
+	incl	%eax
+	incl	%ecx
+	decl	%edx
+	jz	L4
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	jne	L3
+
+	incl	%eax
+	incl	%ecx
+	decl	%edx
+	jz	L4
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	jne	L3
+
+	incl	%eax
+	incl	%ecx
+	decl	%edx
+	jz	L4
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	jne	L3
+
+	incl	%eax
+	incl	%ecx
+	decl	%edx
+	jz	L4
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	jne	L3
+
+	incl	%eax
+	incl	%ecx
+	decl	%edx
+	jz	L4
+	movb	(%eax),%bl
+	testb	%bl,%bl
+	jz	L3
+	cmpb	%bl,(%ecx)
+	je	L1
+
+	.align 2,0x90
+L3:	movzbl	(%eax),%eax		/* unsigned comparision */
+	movzbl	(%ecx),%ecx
+	subl	%ecx,%eax
+	popl	%ebx
+	ret
+	.align 2,0x90
+L4:	xorl	%eax,%eax
+	popl	%ebx
+	ret
diff --git a/libc/arch-x86/string/strrchr.S b/libc/arch-x86/string/strrchr.S
new file mode 100644
index 0000000..4ee153f
--- /dev/null
+++ b/libc/arch-x86/string/strrchr.S
@@ -0,0 +1,3 @@
+/*	$OpenBSD: strrchr.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+#define STRRCHR
+#include "rindex.S"
diff --git a/libc/arch-x86/string/swab.S b/libc/arch-x86/string/swab.S
new file mode 100644
index 0000000..3055860
--- /dev/null
+++ b/libc/arch-x86/string/swab.S
@@ -0,0 +1,67 @@
+/*	$OpenBSD: swab.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ */
+
+#include <machine/asm.h>
+
+/*
+ * On the i486, this code is negligibly faster than the code generated
+ * by gcc at about half the size.  If my i386 databook is correct, it
+ * should be considerably faster than the gcc code on a i386.
+ */
+
+ENTRY(swab)
+	pushl	%esi
+	pushl	%edi
+	movl	12(%esp),%esi
+	movl	16(%esp),%edi
+	movl	20(%esp),%ecx
+
+	cld				# set direction forward
+
+	shrl	$1,%ecx
+	testl	$7,%ecx			# copy first group of 1 to 7 words
+	jz	L2			# while swaping alternate bytes.
+	.align	2,0x90
+L1:	lodsw
+	rorw	$8,%ax
+	stosw
+	decl	%ecx
+	testl	$7,%ecx
+	jnz	L1
+
+L2:	shrl	$3,%ecx			# copy remainder 8 words at a time
+	jz	L4			# while swapping alternate bytes.
+	.align	2,0x90
+L3:	lodsw
+	rorw	$8,%ax
+	stosw
+	lodsw
+	rorw	$8,%ax
+	stosw
+	lodsw
+	rorw	$8,%ax
+	stosw
+	lodsw
+	rorw	$8,%ax
+	stosw
+	lodsw
+	rorw	$8,%ax
+	stosw
+	lodsw
+	rorw	$8,%ax
+	stosw
+	lodsw
+	rorw	$8,%ax
+	stosw
+	lodsw
+	rorw	$8,%ax
+	stosw
+	decl	%ecx
+	jnz	L3
+
+L4:	popl	%edi
+	popl	%esi
+	ret
diff --git a/libc/arch-x86/syscalls/__brk.S b/libc/arch-x86/syscalls/__brk.S
new file mode 100644
index 0000000..235cc4f
--- /dev/null
+++ b/libc/arch-x86/syscalls/__brk.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __brk, @function
+    .globl __brk
+    .align 4
+
+__brk:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_brk, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__clone.S b/libc/arch-x86/syscalls/__clone.S
new file mode 100644
index 0000000..5862129
--- /dev/null
+++ b/libc/arch-x86/syscalls/__clone.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __clone, @function
+    .globl __clone
+    .align 4
+
+__clone:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_clone, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__fcntl.S b/libc/arch-x86/syscalls/__fcntl.S
new file mode 100644
index 0000000..377f08e
--- /dev/null
+++ b/libc/arch-x86/syscalls/__fcntl.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __fcntl, @function
+    .globl __fcntl
+    .align 4
+
+__fcntl:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_fcntl, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__fcntl64.S b/libc/arch-x86/syscalls/__fcntl64.S
new file mode 100644
index 0000000..2ed47fe
--- /dev/null
+++ b/libc/arch-x86/syscalls/__fcntl64.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __fcntl64, @function
+    .globl __fcntl64
+    .align 4
+
+__fcntl64:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_fcntl64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__getcwd.S b/libc/arch-x86/syscalls/__getcwd.S
new file mode 100644
index 0000000..f2bd520
--- /dev/null
+++ b/libc/arch-x86/syscalls/__getcwd.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __getcwd, @function
+    .globl __getcwd
+    .align 4
+
+__getcwd:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_getcwd, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__getpriority.S b/libc/arch-x86/syscalls/__getpriority.S
new file mode 100644
index 0000000..08503d8
--- /dev/null
+++ b/libc/arch-x86/syscalls/__getpriority.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __getpriority, @function
+    .globl __getpriority
+    .align 4
+
+__getpriority:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_getpriority, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__ioctl.S b/libc/arch-x86/syscalls/__ioctl.S
new file mode 100644
index 0000000..cdde9ab
--- /dev/null
+++ b/libc/arch-x86/syscalls/__ioctl.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __ioctl, @function
+    .globl __ioctl
+    .align 4
+
+__ioctl:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_ioctl, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__llseek.S b/libc/arch-x86/syscalls/__llseek.S
new file mode 100644
index 0000000..df49a94
--- /dev/null
+++ b/libc/arch-x86/syscalls/__llseek.S
@@ -0,0 +1,35 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __llseek, @function
+    .globl __llseek
+    .align 4
+
+__llseek:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    mov     24(%esp), %ebx
+    mov     28(%esp), %ecx
+    mov     32(%esp), %edx
+    mov     36(%esp), %esi
+    mov     40(%esp), %edi
+    movl    $__NR__llseek, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__mmap2.S b/libc/arch-x86/syscalls/__mmap2.S
new file mode 100644
index 0000000..fea571f
--- /dev/null
+++ b/libc/arch-x86/syscalls/__mmap2.S
@@ -0,0 +1,38 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __mmap2, @function
+    .globl __mmap2
+    .align 4
+
+__mmap2:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    pushl   %ebp
+    mov     28(%esp), %ebx
+    mov     32(%esp), %ecx
+    mov     36(%esp), %edx
+    mov     40(%esp), %esi
+    mov     44(%esp), %edi
+    mov     48(%esp), %ebp
+    movl    $__NR_mmap2, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebp
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__open.S b/libc/arch-x86/syscalls/__open.S
new file mode 100644
index 0000000..df6fd93
--- /dev/null
+++ b/libc/arch-x86/syscalls/__open.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __open, @function
+    .globl __open
+    .align 4
+
+__open:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_open, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__openat.S b/libc/arch-x86/syscalls/__openat.S
new file mode 100644
index 0000000..aa14927
--- /dev/null
+++ b/libc/arch-x86/syscalls/__openat.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __openat, @function
+    .globl __openat
+    .align 4
+
+__openat:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_openat, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__ptrace.S b/libc/arch-x86/syscalls/__ptrace.S
new file mode 100644
index 0000000..bec952b
--- /dev/null
+++ b/libc/arch-x86/syscalls/__ptrace.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __ptrace, @function
+    .globl __ptrace
+    .align 4
+
+__ptrace:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_ptrace, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__reboot.S b/libc/arch-x86/syscalls/__reboot.S
new file mode 100644
index 0000000..6cb74e2
--- /dev/null
+++ b/libc/arch-x86/syscalls/__reboot.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __reboot, @function
+    .globl __reboot
+    .align 4
+
+__reboot:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_reboot, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__rt_sigaction.S b/libc/arch-x86/syscalls/__rt_sigaction.S
new file mode 100644
index 0000000..c57f580
--- /dev/null
+++ b/libc/arch-x86/syscalls/__rt_sigaction.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __rt_sigaction, @function
+    .globl __rt_sigaction
+    .align 4
+
+__rt_sigaction:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_rt_sigaction, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__rt_sigprocmask.S b/libc/arch-x86/syscalls/__rt_sigprocmask.S
new file mode 100644
index 0000000..623331b
--- /dev/null
+++ b/libc/arch-x86/syscalls/__rt_sigprocmask.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __rt_sigprocmask, @function
+    .globl __rt_sigprocmask
+    .align 4
+
+__rt_sigprocmask:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_rt_sigprocmask, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__rt_sigtimedwait.S b/libc/arch-x86/syscalls/__rt_sigtimedwait.S
new file mode 100644
index 0000000..8e14a89
--- /dev/null
+++ b/libc/arch-x86/syscalls/__rt_sigtimedwait.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __rt_sigtimedwait, @function
+    .globl __rt_sigtimedwait
+    .align 4
+
+__rt_sigtimedwait:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_rt_sigtimedwait, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__set_thread_area.S b/libc/arch-x86/syscalls/__set_thread_area.S
new file mode 100644
index 0000000..cd22040
--- /dev/null
+++ b/libc/arch-x86/syscalls/__set_thread_area.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __set_thread_area, @function
+    .globl __set_thread_area
+    .align 4
+
+__set_thread_area:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_set_thread_area, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__sigsuspend.S b/libc/arch-x86/syscalls/__sigsuspend.S
new file mode 100644
index 0000000..64de756
--- /dev/null
+++ b/libc/arch-x86/syscalls/__sigsuspend.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __sigsuspend, @function
+    .globl __sigsuspend
+    .align 4
+
+__sigsuspend:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_sigsuspend, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__statfs64.S b/libc/arch-x86/syscalls/__statfs64.S
new file mode 100644
index 0000000..a0685b7
--- /dev/null
+++ b/libc/arch-x86/syscalls/__statfs64.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __statfs64, @function
+    .globl __statfs64
+    .align 4
+
+__statfs64:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_statfs64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__syslog.S b/libc/arch-x86/syscalls/__syslog.S
new file mode 100644
index 0000000..3982db4
--- /dev/null
+++ b/libc/arch-x86/syscalls/__syslog.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __syslog, @function
+    .globl __syslog
+    .align 4
+
+__syslog:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_syslog, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/__wait4.S b/libc/arch-x86/syscalls/__wait4.S
new file mode 100644
index 0000000..75ffb95
--- /dev/null
+++ b/libc/arch-x86/syscalls/__wait4.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type __wait4, @function
+    .globl __wait4
+    .align 4
+
+__wait4:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_wait4, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/_exit.S b/libc/arch-x86/syscalls/_exit.S
new file mode 100644
index 0000000..21aa49f
--- /dev/null
+++ b/libc/arch-x86/syscalls/_exit.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type _exit, @function
+    .globl _exit
+    .align 4
+
+_exit:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_exit_group, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/_exit_thread.S b/libc/arch-x86/syscalls/_exit_thread.S
new file mode 100644
index 0000000..16aaa5b
--- /dev/null
+++ b/libc/arch-x86/syscalls/_exit_thread.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type _exit_thread, @function
+    .globl _exit_thread
+    .align 4
+
+_exit_thread:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_exit, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/_waitpid.S b/libc/arch-x86/syscalls/_waitpid.S
new file mode 100644
index 0000000..7e76496
--- /dev/null
+++ b/libc/arch-x86/syscalls/_waitpid.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type _waitpid, @function
+    .globl _waitpid
+    .align 4
+
+_waitpid:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_waitpid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/access.S b/libc/arch-x86/syscalls/access.S
new file mode 100644
index 0000000..fff26a9
--- /dev/null
+++ b/libc/arch-x86/syscalls/access.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type access, @function
+    .globl access
+    .align 4
+
+access:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_access, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/acct.S b/libc/arch-x86/syscalls/acct.S
new file mode 100644
index 0000000..711b6fc
--- /dev/null
+++ b/libc/arch-x86/syscalls/acct.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type acct, @function
+    .globl acct
+    .align 4
+
+acct:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_acct, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/capget.S b/libc/arch-x86/syscalls/capget.S
new file mode 100644
index 0000000..e287cb2
--- /dev/null
+++ b/libc/arch-x86/syscalls/capget.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type capget, @function
+    .globl capget
+    .align 4
+
+capget:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_capget, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/capset.S b/libc/arch-x86/syscalls/capset.S
new file mode 100644
index 0000000..ce71f6e
--- /dev/null
+++ b/libc/arch-x86/syscalls/capset.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type capset, @function
+    .globl capset
+    .align 4
+
+capset:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_capset, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/chdir.S b/libc/arch-x86/syscalls/chdir.S
new file mode 100644
index 0000000..be88847
--- /dev/null
+++ b/libc/arch-x86/syscalls/chdir.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type chdir, @function
+    .globl chdir
+    .align 4
+
+chdir:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_chdir, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/chmod.S b/libc/arch-x86/syscalls/chmod.S
new file mode 100644
index 0000000..d023a7d
--- /dev/null
+++ b/libc/arch-x86/syscalls/chmod.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type chmod, @function
+    .globl chmod
+    .align 4
+
+chmod:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_chmod, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/chown.S b/libc/arch-x86/syscalls/chown.S
new file mode 100644
index 0000000..5646088
--- /dev/null
+++ b/libc/arch-x86/syscalls/chown.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type chown, @function
+    .globl chown
+    .align 4
+
+chown:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_chown32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/chroot.S b/libc/arch-x86/syscalls/chroot.S
new file mode 100644
index 0000000..461087c
--- /dev/null
+++ b/libc/arch-x86/syscalls/chroot.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type chroot, @function
+    .globl chroot
+    .align 4
+
+chroot:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_chroot, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/clock_getres.S b/libc/arch-x86/syscalls/clock_getres.S
new file mode 100644
index 0000000..07742ae
--- /dev/null
+++ b/libc/arch-x86/syscalls/clock_getres.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type clock_getres, @function
+    .globl clock_getres
+    .align 4
+
+clock_getres:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_clock_getres, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/clock_gettime.S b/libc/arch-x86/syscalls/clock_gettime.S
new file mode 100644
index 0000000..bfe14a4
--- /dev/null
+++ b/libc/arch-x86/syscalls/clock_gettime.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type clock_gettime, @function
+    .globl clock_gettime
+    .align 4
+
+clock_gettime:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_clock_gettime, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/clock_nanosleep.S b/libc/arch-x86/syscalls/clock_nanosleep.S
new file mode 100644
index 0000000..c400e3f
--- /dev/null
+++ b/libc/arch-x86/syscalls/clock_nanosleep.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type clock_nanosleep, @function
+    .globl clock_nanosleep
+    .align 4
+
+clock_nanosleep:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_clock_nanosleep, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/clock_settime.S b/libc/arch-x86/syscalls/clock_settime.S
new file mode 100644
index 0000000..58495ba
--- /dev/null
+++ b/libc/arch-x86/syscalls/clock_settime.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type clock_settime, @function
+    .globl clock_settime
+    .align 4
+
+clock_settime:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_clock_settime, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/close.S b/libc/arch-x86/syscalls/close.S
new file mode 100644
index 0000000..1944a83
--- /dev/null
+++ b/libc/arch-x86/syscalls/close.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type close, @function
+    .globl close
+    .align 4
+
+close:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_close, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/delete_module.S b/libc/arch-x86/syscalls/delete_module.S
new file mode 100644
index 0000000..6865d6a
--- /dev/null
+++ b/libc/arch-x86/syscalls/delete_module.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type delete_module, @function
+    .globl delete_module
+    .align 4
+
+delete_module:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_delete_module, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/dup.S b/libc/arch-x86/syscalls/dup.S
new file mode 100644
index 0000000..155de79
--- /dev/null
+++ b/libc/arch-x86/syscalls/dup.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type dup, @function
+    .globl dup
+    .align 4
+
+dup:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_dup, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/dup2.S b/libc/arch-x86/syscalls/dup2.S
new file mode 100644
index 0000000..59f8329
--- /dev/null
+++ b/libc/arch-x86/syscalls/dup2.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type dup2, @function
+    .globl dup2
+    .align 4
+
+dup2:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_dup2, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/epoll_create.S b/libc/arch-x86/syscalls/epoll_create.S
new file mode 100644
index 0000000..8106c58
--- /dev/null
+++ b/libc/arch-x86/syscalls/epoll_create.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type epoll_create, @function
+    .globl epoll_create
+    .align 4
+
+epoll_create:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_epoll_create, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/epoll_ctl.S b/libc/arch-x86/syscalls/epoll_ctl.S
new file mode 100644
index 0000000..ff2c112
--- /dev/null
+++ b/libc/arch-x86/syscalls/epoll_ctl.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type epoll_ctl, @function
+    .globl epoll_ctl
+    .align 4
+
+epoll_ctl:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_epoll_ctl, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/epoll_wait.S b/libc/arch-x86/syscalls/epoll_wait.S
new file mode 100644
index 0000000..3d81a14
--- /dev/null
+++ b/libc/arch-x86/syscalls/epoll_wait.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type epoll_wait, @function
+    .globl epoll_wait
+    .align 4
+
+epoll_wait:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_epoll_wait, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/execve.S b/libc/arch-x86/syscalls/execve.S
new file mode 100644
index 0000000..0ab1d75
--- /dev/null
+++ b/libc/arch-x86/syscalls/execve.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type execve, @function
+    .globl execve
+    .align 4
+
+execve:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_execve, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fchdir.S b/libc/arch-x86/syscalls/fchdir.S
new file mode 100644
index 0000000..4e681be
--- /dev/null
+++ b/libc/arch-x86/syscalls/fchdir.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fchdir, @function
+    .globl fchdir
+    .align 4
+
+fchdir:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_fchdir, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fchmod.S b/libc/arch-x86/syscalls/fchmod.S
new file mode 100644
index 0000000..58f8a94
--- /dev/null
+++ b/libc/arch-x86/syscalls/fchmod.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fchmod, @function
+    .globl fchmod
+    .align 4
+
+fchmod:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_fchmod, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fchmodat.S b/libc/arch-x86/syscalls/fchmodat.S
new file mode 100644
index 0000000..b5b9c6d
--- /dev/null
+++ b/libc/arch-x86/syscalls/fchmodat.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fchmodat, @function
+    .globl fchmodat
+    .align 4
+
+fchmodat:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_fchmodat, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fchown.S b/libc/arch-x86/syscalls/fchown.S
new file mode 100644
index 0000000..c648d7f
--- /dev/null
+++ b/libc/arch-x86/syscalls/fchown.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fchown, @function
+    .globl fchown
+    .align 4
+
+fchown:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_fchown32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fchownat.S b/libc/arch-x86/syscalls/fchownat.S
new file mode 100644
index 0000000..3bec843
--- /dev/null
+++ b/libc/arch-x86/syscalls/fchownat.S
@@ -0,0 +1,35 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fchownat, @function
+    .globl fchownat
+    .align 4
+
+fchownat:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    mov     24(%esp), %ebx
+    mov     28(%esp), %ecx
+    mov     32(%esp), %edx
+    mov     36(%esp), %esi
+    mov     40(%esp), %edi
+    movl    $__NR_fchownat, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/flock.S b/libc/arch-x86/syscalls/flock.S
new file mode 100644
index 0000000..1ca09a5
--- /dev/null
+++ b/libc/arch-x86/syscalls/flock.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type flock, @function
+    .globl flock
+    .align 4
+
+flock:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_flock, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fork.S b/libc/arch-x86/syscalls/fork.S
new file mode 100644
index 0000000..fbc1af3
--- /dev/null
+++ b/libc/arch-x86/syscalls/fork.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fork, @function
+    .globl fork
+    .align 4
+
+fork:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_fork, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fstat.S b/libc/arch-x86/syscalls/fstat.S
new file mode 100644
index 0000000..8f58316
--- /dev/null
+++ b/libc/arch-x86/syscalls/fstat.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fstat, @function
+    .globl fstat
+    .align 4
+
+fstat:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_fstat64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fstatat.S b/libc/arch-x86/syscalls/fstatat.S
new file mode 100644
index 0000000..4926e99
--- /dev/null
+++ b/libc/arch-x86/syscalls/fstatat.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fstatat, @function
+    .globl fstatat
+    .align 4
+
+fstatat:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_fstatat64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fstatfs.S b/libc/arch-x86/syscalls/fstatfs.S
new file mode 100644
index 0000000..f72b3d4
--- /dev/null
+++ b/libc/arch-x86/syscalls/fstatfs.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fstatfs, @function
+    .globl fstatfs
+    .align 4
+
+fstatfs:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_fstatfs64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/fsync.S b/libc/arch-x86/syscalls/fsync.S
new file mode 100644
index 0000000..d9fd225
--- /dev/null
+++ b/libc/arch-x86/syscalls/fsync.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type fsync, @function
+    .globl fsync
+    .align 4
+
+fsync:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_fsync, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/ftruncate.S b/libc/arch-x86/syscalls/ftruncate.S
new file mode 100644
index 0000000..25b7df5
--- /dev/null
+++ b/libc/arch-x86/syscalls/ftruncate.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type ftruncate, @function
+    .globl ftruncate
+    .align 4
+
+ftruncate:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_ftruncate, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/futex.S b/libc/arch-x86/syscalls/futex.S
new file mode 100644
index 0000000..ac51316
--- /dev/null
+++ b/libc/arch-x86/syscalls/futex.S
@@ -0,0 +1,38 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type futex, @function
+    .globl futex
+    .align 4
+
+futex:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    pushl   %ebp
+    mov     28(%esp), %ebx
+    mov     32(%esp), %ecx
+    mov     36(%esp), %edx
+    mov     40(%esp), %esi
+    mov     44(%esp), %edi
+    mov     48(%esp), %ebp
+    movl    $__NR_futex, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebp
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/getdents.S b/libc/arch-x86/syscalls/getdents.S
new file mode 100644
index 0000000..b8c527f
--- /dev/null
+++ b/libc/arch-x86/syscalls/getdents.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getdents, @function
+    .globl getdents
+    .align 4
+
+getdents:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_getdents64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/getegid.S b/libc/arch-x86/syscalls/getegid.S
new file mode 100644
index 0000000..e34a147
--- /dev/null
+++ b/libc/arch-x86/syscalls/getegid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getegid, @function
+    .globl getegid
+    .align 4
+
+getegid:
+    movl    $__NR_getegid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/geteuid.S b/libc/arch-x86/syscalls/geteuid.S
new file mode 100644
index 0000000..8ec7297
--- /dev/null
+++ b/libc/arch-x86/syscalls/geteuid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type geteuid, @function
+    .globl geteuid
+    .align 4
+
+geteuid:
+    movl    $__NR_geteuid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/getgid.S b/libc/arch-x86/syscalls/getgid.S
new file mode 100644
index 0000000..d69d722
--- /dev/null
+++ b/libc/arch-x86/syscalls/getgid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getgid, @function
+    .globl getgid
+    .align 4
+
+getgid:
+    movl    $__NR_getgid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/getgroups.S b/libc/arch-x86/syscalls/getgroups.S
new file mode 100644
index 0000000..f6a9912
--- /dev/null
+++ b/libc/arch-x86/syscalls/getgroups.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getgroups, @function
+    .globl getgroups
+    .align 4
+
+getgroups:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_getgroups32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/getpgid.S b/libc/arch-x86/syscalls/getpgid.S
new file mode 100644
index 0000000..ca1e659
--- /dev/null
+++ b/libc/arch-x86/syscalls/getpgid.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getpgid, @function
+    .globl getpgid
+    .align 4
+
+getpgid:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_getpgid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/getpid.S b/libc/arch-x86/syscalls/getpid.S
new file mode 100644
index 0000000..df43b88
--- /dev/null
+++ b/libc/arch-x86/syscalls/getpid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getpid, @function
+    .globl getpid
+    .align 4
+
+getpid:
+    movl    $__NR_getpid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/getppid.S b/libc/arch-x86/syscalls/getppid.S
new file mode 100644
index 0000000..9a882bd
--- /dev/null
+++ b/libc/arch-x86/syscalls/getppid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getppid, @function
+    .globl getppid
+    .align 4
+
+getppid:
+    movl    $__NR_getppid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/getresgid.S b/libc/arch-x86/syscalls/getresgid.S
new file mode 100644
index 0000000..454d32b
--- /dev/null
+++ b/libc/arch-x86/syscalls/getresgid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getresgid, @function
+    .globl getresgid
+    .align 4
+
+getresgid:
+    movl    $__NR_getresgid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/getresuid.S b/libc/arch-x86/syscalls/getresuid.S
new file mode 100644
index 0000000..f07b5c5
--- /dev/null
+++ b/libc/arch-x86/syscalls/getresuid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getresuid, @function
+    .globl getresuid
+    .align 4
+
+getresuid:
+    movl    $__NR_getresuid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/getrlimit.S b/libc/arch-x86/syscalls/getrlimit.S
new file mode 100644
index 0000000..f4c334f
--- /dev/null
+++ b/libc/arch-x86/syscalls/getrlimit.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getrlimit, @function
+    .globl getrlimit
+    .align 4
+
+getrlimit:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_ugetrlimit, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/getrusage.S b/libc/arch-x86/syscalls/getrusage.S
new file mode 100644
index 0000000..750ab5b
--- /dev/null
+++ b/libc/arch-x86/syscalls/getrusage.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getrusage, @function
+    .globl getrusage
+    .align 4
+
+getrusage:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_getrusage, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/gettid.S b/libc/arch-x86/syscalls/gettid.S
new file mode 100644
index 0000000..2e8cb59
--- /dev/null
+++ b/libc/arch-x86/syscalls/gettid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type gettid, @function
+    .globl gettid
+    .align 4
+
+gettid:
+    movl    $__NR_gettid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/gettimeofday.S b/libc/arch-x86/syscalls/gettimeofday.S
new file mode 100644
index 0000000..feffe92
--- /dev/null
+++ b/libc/arch-x86/syscalls/gettimeofday.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type gettimeofday, @function
+    .globl gettimeofday
+    .align 4
+
+gettimeofday:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_gettimeofday, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/getuid.S b/libc/arch-x86/syscalls/getuid.S
new file mode 100644
index 0000000..635105e
--- /dev/null
+++ b/libc/arch-x86/syscalls/getuid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type getuid, @function
+    .globl getuid
+    .align 4
+
+getuid:
+    movl    $__NR_getuid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/init_module.S b/libc/arch-x86/syscalls/init_module.S
new file mode 100644
index 0000000..2e2b088
--- /dev/null
+++ b/libc/arch-x86/syscalls/init_module.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type init_module, @function
+    .globl init_module
+    .align 4
+
+init_module:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_init_module, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/inotify_add_watch.S b/libc/arch-x86/syscalls/inotify_add_watch.S
new file mode 100644
index 0000000..12a12e4
--- /dev/null
+++ b/libc/arch-x86/syscalls/inotify_add_watch.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type inotify_add_watch, @function
+    .globl inotify_add_watch
+    .align 4
+
+inotify_add_watch:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_inotify_add_watch, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/inotify_init.S b/libc/arch-x86/syscalls/inotify_init.S
new file mode 100644
index 0000000..2d186c4
--- /dev/null
+++ b/libc/arch-x86/syscalls/inotify_init.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type inotify_init, @function
+    .globl inotify_init
+    .align 4
+
+inotify_init:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_inotify_init, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/inotify_rm_watch.S b/libc/arch-x86/syscalls/inotify_rm_watch.S
new file mode 100644
index 0000000..f931833
--- /dev/null
+++ b/libc/arch-x86/syscalls/inotify_rm_watch.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type inotify_rm_watch, @function
+    .globl inotify_rm_watch
+    .align 4
+
+inotify_rm_watch:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_inotify_rm_watch, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/kill.S b/libc/arch-x86/syscalls/kill.S
new file mode 100644
index 0000000..e495c54
--- /dev/null
+++ b/libc/arch-x86/syscalls/kill.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type kill, @function
+    .globl kill
+    .align 4
+
+kill:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_kill, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/klogctl.S b/libc/arch-x86/syscalls/klogctl.S
new file mode 100644
index 0000000..e46c8ae
--- /dev/null
+++ b/libc/arch-x86/syscalls/klogctl.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type klogctl, @function
+    .globl klogctl
+    .align 4
+
+klogctl:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_syslog, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/lchown.S b/libc/arch-x86/syscalls/lchown.S
new file mode 100644
index 0000000..f584a32
--- /dev/null
+++ b/libc/arch-x86/syscalls/lchown.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type lchown, @function
+    .globl lchown
+    .align 4
+
+lchown:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_lchown32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/link.S b/libc/arch-x86/syscalls/link.S
new file mode 100644
index 0000000..3946dbf
--- /dev/null
+++ b/libc/arch-x86/syscalls/link.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type link, @function
+    .globl link
+    .align 4
+
+link:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_link, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/lseek.S b/libc/arch-x86/syscalls/lseek.S
new file mode 100644
index 0000000..0b2c57c
--- /dev/null
+++ b/libc/arch-x86/syscalls/lseek.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type lseek, @function
+    .globl lseek
+    .align 4
+
+lseek:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_lseek, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/lstat.S b/libc/arch-x86/syscalls/lstat.S
new file mode 100644
index 0000000..4739f32
--- /dev/null
+++ b/libc/arch-x86/syscalls/lstat.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type lstat, @function
+    .globl lstat
+    .align 4
+
+lstat:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_lstat64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/madvise.S b/libc/arch-x86/syscalls/madvise.S
new file mode 100644
index 0000000..2423cc2
--- /dev/null
+++ b/libc/arch-x86/syscalls/madvise.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type madvise, @function
+    .globl madvise
+    .align 4
+
+madvise:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_madvise, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mincore.S b/libc/arch-x86/syscalls/mincore.S
new file mode 100644
index 0000000..1e02ac2
--- /dev/null
+++ b/libc/arch-x86/syscalls/mincore.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mincore, @function
+    .globl mincore
+    .align 4
+
+mincore:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_mincore, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mkdir.S b/libc/arch-x86/syscalls/mkdir.S
new file mode 100644
index 0000000..4f1d157
--- /dev/null
+++ b/libc/arch-x86/syscalls/mkdir.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mkdir, @function
+    .globl mkdir
+    .align 4
+
+mkdir:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_mkdir, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mkdirat.S b/libc/arch-x86/syscalls/mkdirat.S
new file mode 100644
index 0000000..10406d3
--- /dev/null
+++ b/libc/arch-x86/syscalls/mkdirat.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mkdirat, @function
+    .globl mkdirat
+    .align 4
+
+mkdirat:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_mkdirat, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mknod.S b/libc/arch-x86/syscalls/mknod.S
new file mode 100644
index 0000000..8df1013
--- /dev/null
+++ b/libc/arch-x86/syscalls/mknod.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mknod, @function
+    .globl mknod
+    .align 4
+
+mknod:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_mknod, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mlock.S b/libc/arch-x86/syscalls/mlock.S
new file mode 100644
index 0000000..85323d2
--- /dev/null
+++ b/libc/arch-x86/syscalls/mlock.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mlock, @function
+    .globl mlock
+    .align 4
+
+mlock:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_mlock, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mount.S b/libc/arch-x86/syscalls/mount.S
new file mode 100644
index 0000000..46237d3
--- /dev/null
+++ b/libc/arch-x86/syscalls/mount.S
@@ -0,0 +1,35 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mount, @function
+    .globl mount
+    .align 4
+
+mount:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    mov     24(%esp), %ebx
+    mov     28(%esp), %ecx
+    mov     32(%esp), %edx
+    mov     36(%esp), %esi
+    mov     40(%esp), %edi
+    movl    $__NR_mount, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mprotect.S b/libc/arch-x86/syscalls/mprotect.S
new file mode 100644
index 0000000..f44d564
--- /dev/null
+++ b/libc/arch-x86/syscalls/mprotect.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mprotect, @function
+    .globl mprotect
+    .align 4
+
+mprotect:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_mprotect, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/mremap.S b/libc/arch-x86/syscalls/mremap.S
new file mode 100644
index 0000000..891261c
--- /dev/null
+++ b/libc/arch-x86/syscalls/mremap.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type mremap, @function
+    .globl mremap
+    .align 4
+
+mremap:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_mremap, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/msync.S b/libc/arch-x86/syscalls/msync.S
new file mode 100644
index 0000000..b83ce01
--- /dev/null
+++ b/libc/arch-x86/syscalls/msync.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type msync, @function
+    .globl msync
+    .align 4
+
+msync:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_msync, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/munlock.S b/libc/arch-x86/syscalls/munlock.S
new file mode 100644
index 0000000..75ee75e
--- /dev/null
+++ b/libc/arch-x86/syscalls/munlock.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type munlock, @function
+    .globl munlock
+    .align 4
+
+munlock:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_munlock, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/munmap.S b/libc/arch-x86/syscalls/munmap.S
new file mode 100644
index 0000000..b251844
--- /dev/null
+++ b/libc/arch-x86/syscalls/munmap.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type munmap, @function
+    .globl munmap
+    .align 4
+
+munmap:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_munmap, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/nanosleep.S b/libc/arch-x86/syscalls/nanosleep.S
new file mode 100644
index 0000000..c274d4f
--- /dev/null
+++ b/libc/arch-x86/syscalls/nanosleep.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type nanosleep, @function
+    .globl nanosleep
+    .align 4
+
+nanosleep:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_nanosleep, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/pause.S b/libc/arch-x86/syscalls/pause.S
new file mode 100644
index 0000000..3fe1546
--- /dev/null
+++ b/libc/arch-x86/syscalls/pause.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type pause, @function
+    .globl pause
+    .align 4
+
+pause:
+    movl    $__NR_pause, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/pipe.S b/libc/arch-x86/syscalls/pipe.S
new file mode 100644
index 0000000..d130909
--- /dev/null
+++ b/libc/arch-x86/syscalls/pipe.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type pipe, @function
+    .globl pipe
+    .align 4
+
+pipe:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_pipe, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/poll.S b/libc/arch-x86/syscalls/poll.S
new file mode 100644
index 0000000..b732af6
--- /dev/null
+++ b/libc/arch-x86/syscalls/poll.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type poll, @function
+    .globl poll
+    .align 4
+
+poll:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_poll, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/prctl.S b/libc/arch-x86/syscalls/prctl.S
new file mode 100644
index 0000000..4ce5d89
--- /dev/null
+++ b/libc/arch-x86/syscalls/prctl.S
@@ -0,0 +1,35 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type prctl, @function
+    .globl prctl
+    .align 4
+
+prctl:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    mov     24(%esp), %ebx
+    mov     28(%esp), %ecx
+    mov     32(%esp), %edx
+    mov     36(%esp), %esi
+    mov     40(%esp), %edi
+    movl    $__NR_prctl, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/read.S b/libc/arch-x86/syscalls/read.S
new file mode 100644
index 0000000..63549dc
--- /dev/null
+++ b/libc/arch-x86/syscalls/read.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type read, @function
+    .globl read
+    .align 4
+
+read:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_read, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/readlink.S b/libc/arch-x86/syscalls/readlink.S
new file mode 100644
index 0000000..53c7632
--- /dev/null
+++ b/libc/arch-x86/syscalls/readlink.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type readlink, @function
+    .globl readlink
+    .align 4
+
+readlink:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_readlink, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/readv.S b/libc/arch-x86/syscalls/readv.S
new file mode 100644
index 0000000..ed352d2
--- /dev/null
+++ b/libc/arch-x86/syscalls/readv.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type readv, @function
+    .globl readv
+    .align 4
+
+readv:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_readv, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/rename.S b/libc/arch-x86/syscalls/rename.S
new file mode 100644
index 0000000..79ae119
--- /dev/null
+++ b/libc/arch-x86/syscalls/rename.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type rename, @function
+    .globl rename
+    .align 4
+
+rename:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_rename, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/renameat.S b/libc/arch-x86/syscalls/renameat.S
new file mode 100644
index 0000000..30ba210
--- /dev/null
+++ b/libc/arch-x86/syscalls/renameat.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type renameat, @function
+    .globl renameat
+    .align 4
+
+renameat:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_renameat, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/rmdir.S b/libc/arch-x86/syscalls/rmdir.S
new file mode 100644
index 0000000..124c10d
--- /dev/null
+++ b/libc/arch-x86/syscalls/rmdir.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type rmdir, @function
+    .globl rmdir
+    .align 4
+
+rmdir:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_rmdir, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_get_priority_max.S b/libc/arch-x86/syscalls/sched_get_priority_max.S
new file mode 100644
index 0000000..e2d09a6
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_get_priority_max.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_get_priority_max, @function
+    .globl sched_get_priority_max
+    .align 4
+
+sched_get_priority_max:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_sched_get_priority_max, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_get_priority_min.S b/libc/arch-x86/syscalls/sched_get_priority_min.S
new file mode 100644
index 0000000..0f66eee
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_get_priority_min.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_get_priority_min, @function
+    .globl sched_get_priority_min
+    .align 4
+
+sched_get_priority_min:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_sched_get_priority_min, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_getparam.S b/libc/arch-x86/syscalls/sched_getparam.S
new file mode 100644
index 0000000..2a8bd0e
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_getparam.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_getparam, @function
+    .globl sched_getparam
+    .align 4
+
+sched_getparam:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_sched_getparam, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_getscheduler.S b/libc/arch-x86/syscalls/sched_getscheduler.S
new file mode 100644
index 0000000..aaa5f8c
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_getscheduler.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_getscheduler, @function
+    .globl sched_getscheduler
+    .align 4
+
+sched_getscheduler:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_sched_getscheduler, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_rr_get_interval.S b/libc/arch-x86/syscalls/sched_rr_get_interval.S
new file mode 100644
index 0000000..58ccddd
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_rr_get_interval.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_rr_get_interval, @function
+    .globl sched_rr_get_interval
+    .align 4
+
+sched_rr_get_interval:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_sched_rr_get_interval, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_setparam.S b/libc/arch-x86/syscalls/sched_setparam.S
new file mode 100644
index 0000000..4b869bf
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_setparam.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_setparam, @function
+    .globl sched_setparam
+    .align 4
+
+sched_setparam:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_sched_setparam, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_setscheduler.S b/libc/arch-x86/syscalls/sched_setscheduler.S
new file mode 100644
index 0000000..099a6d1
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_setscheduler.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_setscheduler, @function
+    .globl sched_setscheduler
+    .align 4
+
+sched_setscheduler:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_sched_setscheduler, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sched_yield.S b/libc/arch-x86/syscalls/sched_yield.S
new file mode 100644
index 0000000..fcd7281
--- /dev/null
+++ b/libc/arch-x86/syscalls/sched_yield.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sched_yield, @function
+    .globl sched_yield
+    .align 4
+
+sched_yield:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_sched_yield, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/select.S b/libc/arch-x86/syscalls/select.S
new file mode 100644
index 0000000..27359a9
--- /dev/null
+++ b/libc/arch-x86/syscalls/select.S
@@ -0,0 +1,35 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type select, @function
+    .globl select
+    .align 4
+
+select:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    mov     24(%esp), %ebx
+    mov     28(%esp), %ecx
+    mov     32(%esp), %edx
+    mov     36(%esp), %esi
+    mov     40(%esp), %edi
+    movl    $__NR__newselect, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sendfile.S b/libc/arch-x86/syscalls/sendfile.S
new file mode 100644
index 0000000..2752eec
--- /dev/null
+++ b/libc/arch-x86/syscalls/sendfile.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sendfile, @function
+    .globl sendfile
+    .align 4
+
+sendfile:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_sendfile, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setgid.S b/libc/arch-x86/syscalls/setgid.S
new file mode 100644
index 0000000..67fd02e
--- /dev/null
+++ b/libc/arch-x86/syscalls/setgid.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setgid, @function
+    .globl setgid
+    .align 4
+
+setgid:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_setgid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setgroups.S b/libc/arch-x86/syscalls/setgroups.S
new file mode 100644
index 0000000..b6bab11
--- /dev/null
+++ b/libc/arch-x86/syscalls/setgroups.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setgroups, @function
+    .globl setgroups
+    .align 4
+
+setgroups:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_setgroups32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setitimer.S b/libc/arch-x86/syscalls/setitimer.S
new file mode 100644
index 0000000..29d4bc6
--- /dev/null
+++ b/libc/arch-x86/syscalls/setitimer.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setitimer, @function
+    .globl setitimer
+    .align 4
+
+setitimer:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_setitimer, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setpgid.S b/libc/arch-x86/syscalls/setpgid.S
new file mode 100644
index 0000000..df72382
--- /dev/null
+++ b/libc/arch-x86/syscalls/setpgid.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setpgid, @function
+    .globl setpgid
+    .align 4
+
+setpgid:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_setpgid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setpriority.S b/libc/arch-x86/syscalls/setpriority.S
new file mode 100644
index 0000000..39d7a18
--- /dev/null
+++ b/libc/arch-x86/syscalls/setpriority.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setpriority, @function
+    .globl setpriority
+    .align 4
+
+setpriority:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_setpriority, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setregid.S b/libc/arch-x86/syscalls/setregid.S
new file mode 100644
index 0000000..c3112de
--- /dev/null
+++ b/libc/arch-x86/syscalls/setregid.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setregid, @function
+    .globl setregid
+    .align 4
+
+setregid:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_setregid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setresgid.S b/libc/arch-x86/syscalls/setresgid.S
new file mode 100644
index 0000000..8e6c8c9
--- /dev/null
+++ b/libc/arch-x86/syscalls/setresgid.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setresgid, @function
+    .globl setresgid
+    .align 4
+
+setresgid:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_setresgid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setresuid.S b/libc/arch-x86/syscalls/setresuid.S
new file mode 100644
index 0000000..f81cb39
--- /dev/null
+++ b/libc/arch-x86/syscalls/setresuid.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setresuid, @function
+    .globl setresuid
+    .align 4
+
+setresuid:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_setresuid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setreuid.S b/libc/arch-x86/syscalls/setreuid.S
new file mode 100644
index 0000000..99e5d5b
--- /dev/null
+++ b/libc/arch-x86/syscalls/setreuid.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setreuid, @function
+    .globl setreuid
+    .align 4
+
+setreuid:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_setreuid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setrlimit.S b/libc/arch-x86/syscalls/setrlimit.S
new file mode 100644
index 0000000..31613c5
--- /dev/null
+++ b/libc/arch-x86/syscalls/setrlimit.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setrlimit, @function
+    .globl setrlimit
+    .align 4
+
+setrlimit:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_setrlimit, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setsid.S b/libc/arch-x86/syscalls/setsid.S
new file mode 100644
index 0000000..db31380
--- /dev/null
+++ b/libc/arch-x86/syscalls/setsid.S
@@ -0,0 +1,20 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setsid, @function
+    .globl setsid
+    .align 4
+
+setsid:
+    movl    $__NR_setsid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    ret
diff --git a/libc/arch-x86/syscalls/settimeofday.S b/libc/arch-x86/syscalls/settimeofday.S
new file mode 100644
index 0000000..e77fa1e
--- /dev/null
+++ b/libc/arch-x86/syscalls/settimeofday.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type settimeofday, @function
+    .globl settimeofday
+    .align 4
+
+settimeofday:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_settimeofday, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/setuid.S b/libc/arch-x86/syscalls/setuid.S
new file mode 100644
index 0000000..de334c0
--- /dev/null
+++ b/libc/arch-x86/syscalls/setuid.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type setuid, @function
+    .globl setuid
+    .align 4
+
+setuid:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_setuid32, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sigaction.S b/libc/arch-x86/syscalls/sigaction.S
new file mode 100644
index 0000000..b16e3aa
--- /dev/null
+++ b/libc/arch-x86/syscalls/sigaction.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sigaction, @function
+    .globl sigaction
+    .align 4
+
+sigaction:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_sigaction, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sigpending.S b/libc/arch-x86/syscalls/sigpending.S
new file mode 100644
index 0000000..2280886
--- /dev/null
+++ b/libc/arch-x86/syscalls/sigpending.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sigpending, @function
+    .globl sigpending
+    .align 4
+
+sigpending:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_sigpending, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sigprocmask.S b/libc/arch-x86/syscalls/sigprocmask.S
new file mode 100644
index 0000000..42fcf92
--- /dev/null
+++ b/libc/arch-x86/syscalls/sigprocmask.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sigprocmask, @function
+    .globl sigprocmask
+    .align 4
+
+sigprocmask:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_sigprocmask, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/stat.S b/libc/arch-x86/syscalls/stat.S
new file mode 100644
index 0000000..c9984f1
--- /dev/null
+++ b/libc/arch-x86/syscalls/stat.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type stat, @function
+    .globl stat
+    .align 4
+
+stat:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_stat64, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/symlink.S b/libc/arch-x86/syscalls/symlink.S
new file mode 100644
index 0000000..04c4298
--- /dev/null
+++ b/libc/arch-x86/syscalls/symlink.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type symlink, @function
+    .globl symlink
+    .align 4
+
+symlink:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_symlink, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/sync.S b/libc/arch-x86/syscalls/sync.S
new file mode 100644
index 0000000..5a6a727
--- /dev/null
+++ b/libc/arch-x86/syscalls/sync.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type sync, @function
+    .globl sync
+    .align 4
+
+sync:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_sync, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/timer_create.S b/libc/arch-x86/syscalls/timer_create.S
new file mode 100644
index 0000000..a215210
--- /dev/null
+++ b/libc/arch-x86/syscalls/timer_create.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type timer_create, @function
+    .globl timer_create
+    .align 4
+
+timer_create:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_timer_create, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/timer_delete.S b/libc/arch-x86/syscalls/timer_delete.S
new file mode 100644
index 0000000..f939db6
--- /dev/null
+++ b/libc/arch-x86/syscalls/timer_delete.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type timer_delete, @function
+    .globl timer_delete
+    .align 4
+
+timer_delete:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_timer_delete, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/timer_getoverrun.S b/libc/arch-x86/syscalls/timer_getoverrun.S
new file mode 100644
index 0000000..0a1fa1d
--- /dev/null
+++ b/libc/arch-x86/syscalls/timer_getoverrun.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type timer_getoverrun, @function
+    .globl timer_getoverrun
+    .align 4
+
+timer_getoverrun:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_timer_getoverrun, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/timer_gettime.S b/libc/arch-x86/syscalls/timer_gettime.S
new file mode 100644
index 0000000..07258be
--- /dev/null
+++ b/libc/arch-x86/syscalls/timer_gettime.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type timer_gettime, @function
+    .globl timer_gettime
+    .align 4
+
+timer_gettime:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_timer_gettime, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/timer_settime.S b/libc/arch-x86/syscalls/timer_settime.S
new file mode 100644
index 0000000..6c3784a
--- /dev/null
+++ b/libc/arch-x86/syscalls/timer_settime.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type timer_settime, @function
+    .globl timer_settime
+    .align 4
+
+timer_settime:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    mov     20(%esp), %ebx
+    mov     24(%esp), %ecx
+    mov     28(%esp), %edx
+    mov     32(%esp), %esi
+    movl    $__NR_timer_settime, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/times.S b/libc/arch-x86/syscalls/times.S
new file mode 100644
index 0000000..543f2be
--- /dev/null
+++ b/libc/arch-x86/syscalls/times.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type times, @function
+    .globl times
+    .align 4
+
+times:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_times, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/tkill.S b/libc/arch-x86/syscalls/tkill.S
new file mode 100644
index 0000000..f1f174b
--- /dev/null
+++ b/libc/arch-x86/syscalls/tkill.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type tkill, @function
+    .globl tkill
+    .align 4
+
+tkill:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_tkill, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/truncate.S b/libc/arch-x86/syscalls/truncate.S
new file mode 100644
index 0000000..8c6646d
--- /dev/null
+++ b/libc/arch-x86/syscalls/truncate.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type truncate, @function
+    .globl truncate
+    .align 4
+
+truncate:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_truncate, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/umask.S b/libc/arch-x86/syscalls/umask.S
new file mode 100644
index 0000000..fe3d8cd
--- /dev/null
+++ b/libc/arch-x86/syscalls/umask.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type umask, @function
+    .globl umask
+    .align 4
+
+umask:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_umask, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/umount2.S b/libc/arch-x86/syscalls/umount2.S
new file mode 100644
index 0000000..fdb5354
--- /dev/null
+++ b/libc/arch-x86/syscalls/umount2.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type umount2, @function
+    .globl umount2
+    .align 4
+
+umount2:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_umount2, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/uname.S b/libc/arch-x86/syscalls/uname.S
new file mode 100644
index 0000000..b5e8bfa
--- /dev/null
+++ b/libc/arch-x86/syscalls/uname.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type uname, @function
+    .globl uname
+    .align 4
+
+uname:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_uname, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/unlink.S b/libc/arch-x86/syscalls/unlink.S
new file mode 100644
index 0000000..0fe52bf
--- /dev/null
+++ b/libc/arch-x86/syscalls/unlink.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type unlink, @function
+    .globl unlink
+    .align 4
+
+unlink:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_unlink, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/unlinkat.S b/libc/arch-x86/syscalls/unlinkat.S
new file mode 100644
index 0000000..f6f8c17
--- /dev/null
+++ b/libc/arch-x86/syscalls/unlinkat.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type unlinkat, @function
+    .globl unlinkat
+    .align 4
+
+unlinkat:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_unlinkat, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/utimes.S b/libc/arch-x86/syscalls/utimes.S
new file mode 100644
index 0000000..1a1b51d
--- /dev/null
+++ b/libc/arch-x86/syscalls/utimes.S
@@ -0,0 +1,26 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type utimes, @function
+    .globl utimes
+    .align 4
+
+utimes:
+    pushl   %ebx
+    pushl   %ecx
+    mov     12(%esp), %ebx
+    mov     16(%esp), %ecx
+    movl    $__NR_utimes, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/vfork.S b/libc/arch-x86/syscalls/vfork.S
new file mode 100644
index 0000000..55cb9f0
--- /dev/null
+++ b/libc/arch-x86/syscalls/vfork.S
@@ -0,0 +1,23 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type vfork, @function
+    .globl vfork
+    .align 4
+
+vfork:
+    pushl   %ebx
+    mov     8(%esp), %ebx
+    movl    $__NR_vfork, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/waitid.S b/libc/arch-x86/syscalls/waitid.S
new file mode 100644
index 0000000..9a5328b
--- /dev/null
+++ b/libc/arch-x86/syscalls/waitid.S
@@ -0,0 +1,35 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type waitid, @function
+    .globl waitid
+    .align 4
+
+waitid:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    pushl   %esi
+    pushl   %edi
+    mov     24(%esp), %ebx
+    mov     28(%esp), %ecx
+    mov     32(%esp), %edx
+    mov     36(%esp), %esi
+    mov     40(%esp), %edi
+    movl    $__NR_waitid, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edi
+    popl    %esi
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/write.S b/libc/arch-x86/syscalls/write.S
new file mode 100644
index 0000000..caa450f
--- /dev/null
+++ b/libc/arch-x86/syscalls/write.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type write, @function
+    .globl write
+    .align 4
+
+write:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_write, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret
diff --git a/libc/arch-x86/syscalls/writev.S b/libc/arch-x86/syscalls/writev.S
new file mode 100644
index 0000000..53d3731
--- /dev/null
+++ b/libc/arch-x86/syscalls/writev.S
@@ -0,0 +1,29 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+    .text
+    .type writev, @function
+    .globl writev
+    .align 4
+
+writev:
+    pushl   %ebx
+    pushl   %ecx
+    pushl   %edx
+    mov     16(%esp), %ebx
+    mov     20(%esp), %ecx
+    mov     24(%esp), %edx
+    movl    $__NR_writev, %eax
+    int     $0x80
+    cmpl    $-129, %eax
+    jb      1f
+    negl    %eax
+    pushl   %eax
+    call    __set_errno
+    addl    $4, %esp
+    orl     $-1, %eax
+1:
+    popl    %edx
+    popl    %ecx
+    popl    %ebx
+    ret