1 /* Copyright (C) 2001, 2003 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
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
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If not,
16 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
22 /* The syscall stubs jump here when they detect an error, bot for PIC and
25 .syntax no_register_prefix
27 ENTRY (__syscall_error)
30 #ifdef __UCLIBC_HAS_THREADS__
36 /* Note that __syscall_error is only visible within this library,
37 and no-one passes it on as a pointer, so can assume that R0 (GOT
38 pointer) is correctly set up. */
39 PLTCALL (HIDDEN_JUMPTARGET(__errno_location))
45 #else /* not __UCLIBC_HAS_THREADS__ */
48 addo.d C_SYMBOL_NAME(errno:GOT),r0,acr
51 # else /* not __PIC__ */
52 lapc C_SYMBOL_NAME(errno),acr
54 # endif /* not __PIC__ */
55 #else /* not __arch_v32 */
57 move.d [r0+C_SYMBOL_NAME(errno:GOT)],r9
60 move.d r10,[C_SYMBOL_NAME(errno)]
62 #endif /* not __arch_v32 */
63 #endif /* __UCLIBC_HAS_THREADS__ */
66 /* PIC callers are supposed to have R0 on stack, ready for us to restore.
67 Callers are only allowed from within this DSO, so the GOT in r0 is the
70 (Don't use "ret" - it's a macro). */