aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sh/sysdep.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/sh/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/sh/sysdep.h60
1 files changed, 11 insertions, 49 deletions
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index 0fc2c4f1ee..4ba0def0ed 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004,
- 2005,2006,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1993,1995-2000,2002-2006,2009,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>.
@@ -114,13 +114,12 @@
# elif defined _LIBC_REENTRANT
-# if USE___THREAD
-# ifndef NOT_IN_libc
-# define SYSCALL_ERROR_ERRNO __libc_errno
-# else
-# define SYSCALL_ERROR_ERRNO errno
-# endif
-# define SYSCALL_ERROR_HANDLER \
+# ifndef NOT_IN_libc
+# define SYSCALL_ERROR_ERRNO __libc_errno
+# else
+# define SYSCALL_ERROR_ERRNO errno
+# endif
+# define SYSCALL_ERROR_HANDLER \
neg r0,r1; \
mov r12,r2; \
mov.l 0f,r12; \
@@ -137,43 +136,6 @@
.align 2; \
0: .long _GLOBAL_OFFSET_TABLE_; \
1: .long SYSCALL_ERROR_ERRNO@GOTTPOFF
-# else
-# define SYSCALL_ERROR_HANDLER \
- neg r0,r1; \
- mov.l r14,@-r15; \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (r14, 0); \
- mov.l r12,@-r15; \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (r12, 0); \
- mov.l r1,@-r15; \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (r1, 0); \
- mov.l 0f,r12; \
- mova 0f,r0; \
- add r0,r12; \
- sts.l pr,@-r15; \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (pr, 0); \
- mov r15,r14; \
- cfi_def_cfa_register (r14); \
- mov.l 1f,r1; \
- bsrf r1; \
- nop; \
- 2: mov r14,r15; \
- lds.l @r15+,pr; \
- mov.l @r15+,r1; \
- mov.l r1,@r0; \
- mov.l @r15+,r12; \
- mov.l @r15+,r14; \
- bra .Lpseudo_end; \
- mov _IMM1,r0; \
- .align 2; \
- 0: .long _GLOBAL_OFFSET_TABLE_; \
- 1: .long PLTJMP(C_SYMBOL_NAME(__errno_location))-(2b-.)
-/* A quick note: it is assumed that the call to `__errno_location' does
- not modify the stack! */
-# endif
# else
/* Store (-r0) into errno through the GOT. */
# define SYSCALL_ERROR_HANDLER \
@@ -324,8 +286,8 @@
unsigned int resultvar = INTERNAL_SYSCALL (name, , nr, args); \
if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, ), 0)) \
{ \
- __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \
- resultvar = 0xffffffff; \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, )); \
+ resultvar = 0xffffffff; \
} \
(int) resultvar; })
@@ -347,7 +309,7 @@
#define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
({ \
unsigned long int resultvar; \
- register long int r3 asm ("%r3") = (name); \
+ register long int r3 asm ("%r3") = (name); \
SUBSTITUTE_ARGS_##nr(args); \
\
asm volatile (SYSCALL_INST_STR##nr SYSCALL_INST_PAD \