1 /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001
2 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4 Contributed by Alexandre Oliva <aoliva@redhat.com>.
5 Based on ../i386/sysdep.S.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Library General Public
18 License along with the GNU C Library. If not, see
19 <http://www.gnu.org/licenses/>. */
23 #include <bits/errno.h>
25 .globl C_SYMBOL_NAME(errno)
34 #if defined (EWOULDBLOCK_sys) && EWOULDBLOCK_sys != EAGAIN
35 /* We translate the system's EWOULDBLOCK error into EAGAIN.
36 The GNU C library always defines EWOULDBLOCK==EAGAIN.
37 EWOULDBLOCK_sys is the original number. */
38 cmp EWOULDBLOCK_sys,d0 /* Is it the old EWOULDBLOCK? */
39 bne .Lnotb /* Branch if not. */
40 mov EAGAIN,d0 /* Yes; translate it to EAGAIN. */
44 # ifndef _LIBC_REENTRANT
45 mov d0,(C_SYMBOL_NAME (errno))
50 call __errno_location,[],0
56 # error "This shouldn't be assembled for PIC"
62 #undef __syscall_error