]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/unix/sysv/linux/i386/syscall.S
Use <> for include of kernel-features.h.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / i386 / syscall.S
CommitLineData
0da7bcc5 1/* Copyright (C) 1995, 1996, 1998, 2002, 2004 Free Software Foundation, Inc.
b5791037 2 This file is part of the GNU C Library.
28f540f4 3
b5791037 4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
28f540f4 8
b5791037
UD
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
28f540f4 13
41bdb6e2
AJ
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
28f540f4
RM
18
19#include <sysdep.h>
20
cccda09f 21/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for
b5791037 22 more information about the value -4095 used below.*/
cccda09f 23
c14e4c32 24 .text
439d1d45 25ENTRY (syscall)
6ed0492f 26
0da7bcc5
UD
27 PUSHARGS_6 /* Save register contents. */
28 _DOARGS_6(44) /* Load arguments. */
29 movl 20(%esp), %eax /* Load syscall number into %eax. */
f051627f 30 ENTER_KERNEL /* Do the system call. */
0da7bcc5 31 POPARGS_6 /* Restore register contents. */
b5791037 32 cmpl $-4095, %eax /* Check %eax for error. */
c0fb8a56 33 jae SYSCALL_ERROR_LABEL /* Jump to error handler if error. */
8fb3e007 34L(pseudo_end):
439d1d45 35 ret /* Return to caller. */
6ed0492f
UD
36
37PSEUDO_END (syscall)