summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2001-01-17 04:55:37 +0000
committerManuel Novoa III <mjn3@codepoet.org>2001-01-17 04:55:37 +0000
commit2773c94a3ac98835200c6f7032d240b7154b01f0 (patch)
treea34ee5a197d84ea7cb3be51cf084defa1f1a91fd /libc/sysdeps/linux
parent737be33761210922c9f7835fd79bd56d87aae916 (diff)
This is _NOT_ an auto-generated file.
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/common/unified_syscall_i386.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/unified_syscall_i386.h b/libc/sysdeps/linux/common/unified_syscall_i386.h
new file mode 100644
index 000000000..793337af7
--- /dev/null
+++ b/libc/sysdeps/linux/common/unified_syscall_i386.h
@@ -0,0 +1,41 @@
+#undef _syscall0
+#undef _syscall1
+#undef _syscall2
+#undef _syscall3
+#undef _syscall4
+#undef _syscall5
+
+#include "str_syscalls.h"
+
+#undef uClibc_syscall_exit
+#define uClibc_syscall_exit(type,name,type1,arg1) \
+__asm__ ( \
+".text\n.align 4\n.global "###name"\n"#name":;\npushl %ebp;\n" \
+"movl %esp,%ebp;\nsubl $4,%esp;\npushl %ebx;\nmovl 8(%ebp),%ebx;\n" \
+"jmp _start_exit" \
+)
+
+#define unified_syscall_body(name) \
+__asm__ ( \
+".text\n.align 4\n.global "###name"\n"#name":\nmovb $"__STR_NR_##name \
+",%al;\n jmp __uClibc_syscall" \
+)
+
+#define _syscall0(type,name) \
+unified_syscall_body(name)
+
+#define _syscall1(type,name,type1,arg1) \
+unified_syscall_body(name)
+
+#define _syscall2(type,name,type1,arg1,type2,arg2) \
+unified_syscall_body(name)
+
+#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \
+unified_syscall_body(name)
+
+#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
+unified_syscall_body(name)
+
+#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
+unified_syscall_body(name)
+