summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386/__uClibc_syscall.S
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-11 11:42:17 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-11 11:42:17 +0000
commitae97a89e1a1a9833080dccc81f6cd26784e1b964 (patch)
tree6ff1ddc7e3980591c7fd0bbd5d9b8ac82da12886 /libc/sysdeps/linux/i386/__uClibc_syscall.S
parentabdc3e4d06db2b9d93c509774fc7c4fde918ec8e (diff)
A large update from Manuel Novoa III <mnovoa3@bellsouth.net>.
Diffstat (limited to 'libc/sysdeps/linux/i386/__uClibc_syscall.S')
-rw-r--r--libc/sysdeps/linux/i386/__uClibc_syscall.S39
1 files changed, 39 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/i386/__uClibc_syscall.S b/libc/sysdeps/linux/i386/__uClibc_syscall.S
new file mode 100644
index 000000000..ecf2d6350
--- /dev/null
+++ b/libc/sysdeps/linux/i386/__uClibc_syscall.S
@@ -0,0 +1,39 @@
+.globl __uClibc_syscall
+
+.text
+ .align 4
+__uClibc_syscall:
+ pushl %ebp
+ movl %esp,%ebp
+ subl $8,%esp
+ pushl %edi
+ pushl %esi
+ pushl %ebx
+ /* movl $21,%eax */
+ and $0xff,%eax
+ movl 8(%ebp),%ebx
+ movl 12(%ebp),%ecx
+ movl 16(%ebp),%edx
+ movl 20(%ebp),%esi
+ movl 24(%ebp),%edi
+#APP
+ int $0x80
+#NO_APP
+ movl %eax,-4(%ebp)
+ .p2align 4,,7
+ cmpl $-126,-4(%ebp)
+ jbe .L5
+ movl -4(%ebp),%eax
+ negl %eax
+ movl %eax,errno
+ movl $-1,-4(%ebp)
+.L5:
+ movl -4(%ebp),%edx
+ movl %edx,-8(%ebp)
+ movl -8(%ebp),%eax
+ leal -20(%ebp),%esp
+ popl %ebx
+ popl %esi
+ popl %edi
+ leave
+ ret