about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/s390
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390')
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S76
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h37
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S61
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h25
4 files changed, 38 insertions, 161 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S
index 2a1dad0695..5a24fdc2e7 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -32,12 +32,11 @@
 	.text
 ENTRY(__syscall_error)
 #ifndef PIC
-# if USE___THREAD
-#  ifndef NOT_IN_libc
-#   define SYSCALL_ERROR_ERRNO __libc_errno
-#  else
-#   define SYSCALL_ERROR_ERRNO errno
-#  endif
+# ifndef NOT_IN_libc
+#  define SYSCALL_ERROR_ERRNO __libc_errno
+# else
+#  define SYSCALL_ERROR_ERRNO errno
+# endif
 	basr	%r1,0
 0:	l	%r1,1f-0b(%r1)
 	ear	%r3,%a0
@@ -46,34 +45,6 @@ ENTRY(__syscall_error)
 	lhi	%r2,-1
 	br	%r14
 1:	.long	SYSCALL_ERROR_ERRNO@ntpoff
-# elif !defined _LIBC_REENTRANT
-	basr	%r1,0
-0:	l	%r1,1f-0b(%r1)
-	lcr	%r2,%r2
-	st	%r2,0(%r1)
-	lhi	%r2,-1
-	br	%r14
-1:	.long  errno
-# else
-	stm	%r13,%r15,52(%r15)
-	cfi_offset (%r15, -36)
-	cfi_offset (%r14, -40)
-	cfi_offset (%r13, -44)
-	lr	%r0,%r15
-	ahi	%r15,-96
-	cfi_adjust_cfa_offset (96)
-	lcr	%r13,%r2
-	st	%r0,0(%r15)
-	basr	%r1,0
-0:	l	%r1,1f-0b(%r1)
-	basr	%r14,%r1
-	st	%r13,0(%r2)
-	lm	%r13,%r15,148(%r15)
-	cfi_adjust_cfa_offset (-96)
-	lhi	%r2,-1
-	br	%r14
-1:	.long  __errno_location
-#endif
 #else
 # if RTLD_PRIVATE_ERRNO
 	basr	%r1,0
@@ -83,7 +54,7 @@ ENTRY(__syscall_error)
 	lhi	%r2,-1
 	br	%r14
 1:	.long	rtld_errno - 0b
-# elif USE___THREAD
+# else
 #  ifndef NOT_IN_libc
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
@@ -98,39 +69,6 @@ ENTRY(__syscall_error)
 	lhi	%r2,-1
 	br	%r14
 1:	.long	_GLOBAL_OFFSET_TABLE_-0b
-# elif !defined _LIBC_REENTRANT
-	basr	%r1,0
-0:	al	%r1,1f-0b(%r1)
-	l	%r1,errno@GOT(%r1)
-	lcr	%r2,%r2
-	st	%r2,0(0,%r1)
-	lhi	%r2,-1
-	br	%r14
-1:	.long	_GLOBAL_OFFSET_TABLE_-0b
-# else
-	stm	%r11,%r15,44(%r15)
-	cfi_offset (%r15, -36)
-	cfi_offset (%r14, -40)
-	cfi_offset (%r13, -44)
-	cfi_offset (%r12, -48)
-	cfi_offset (%r11, -52)
-	lr	%r0,%r15
-	ahi	%r15,-96
-	cfi_adjust_cfa_offset (96)
-	lcr	%r11,%r2
-	st	%r0,0(%r15)
-	basr	%r13,0
-0:	l	%r12,1f-0b(%r13)
-	l	%r1,2f-0b(%r13)
-	la	%r12,0(%r12,%r13)
-	bas	%r14,0(%r1,%r13)
-	st	%r11,0(%r2)
-	lm	%r11,%r15,140(%r15)
-	cfi_adjust_cfa_offset (-96)
-	lhi	%r2,-1
-	br	%r14
-1:	.long _GLOBAL_OFFSET_TABLE_-0b
-2:	.long __errno_location@PLT-0b
 # endif
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index 13ce9ab748..435eaabb17 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008
+/* Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011
    Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
@@ -56,10 +56,10 @@
 #undef PSEUDO
 #define	PSEUDO(name, syscall_name, args)				      \
   .text;                                                                      \
-  ENTRY (name)							              \
+  ENTRY (name)								      \
     DO_CALL (syscall_name, args);                                             \
     lhi  %r4,-4095 ;                                                          \
-    clr  %r2,%r4 ;		                                              \
+    clr  %r2,%r4 ;							      \
     jnl  SYSCALL_ERROR_LABEL
 
 #undef PSEUDO_END
@@ -70,7 +70,7 @@
 #undef PSEUDO_NOERRNO
 #define	PSEUDO_NOERRNO(name, syscall_name, args)			      \
   .text;                                                                      \
-  ENTRY (name)							              \
+  ENTRY (name)								      \
     DO_CALL (syscall_name, args)
 
 #undef PSEUDO_END_NOERRNO
@@ -80,7 +80,7 @@
 #undef PSEUDO_ERRVAL
 #define	PSEUDO_ERRVAL(name, syscall_name, args)				      \
   .text;                                                                      \
-  ENTRY (name)							              \
+  ENTRY (name)								      \
     DO_CALL (syscall_name, args);					      \
     lcr %r2,%r2
 
@@ -107,14 +107,13 @@
     br    %r14;								      \
 2:  .long rtld_errno-1b
 # 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_LABEL 0f
-#   define SYSCALL_ERROR_HANDLER \
+#  ifndef NOT_IN_libc
+#   define SYSCALL_ERROR_ERRNO __libc_errno
+#  else
+#   define SYSCALL_ERROR_ERRNO errno
+#  endif
+#  define SYSCALL_ERROR_LABEL 0f
+#  define SYSCALL_ERROR_HANDLER \
 0:  lcr   %r0,%r2;							      \
     basr  %r1,0;							      \
 1:  al    %r1,2f-1b(%r1);						      \
@@ -124,14 +123,6 @@
     lhi   %r2,-1;							      \
     br    %r14;								      \
 2:  .long _GLOBAL_OFFSET_TABLE_-1b
-#  else
-#   define SYSCALL_ERROR_LABEL 0f
-#   define SYSCALL_ERROR_HANDLER \
-0:  basr  %r1,0;							      \
-1:  al    %r1,2f-1b(%r1);						      \
-    br    %r1;								      \
-2:  .long syscall_error@plt-1b
-#  endif
 # else
 #  define SYSCALL_ERROR_LABEL 0f
 #  define SYSCALL_ERROR_HANDLER \
@@ -317,8 +308,8 @@
     if (INTERNAL_SYSCALL_ERROR_P (_ret, ))				      \
       {									      \
       iserr:								      \
-        __set_errno (INTERNAL_SYSCALL_ERRNO (_ret, ));			      \
-        _ret = -1L;							      \
+	__set_errno (INTERNAL_SYSCALL_ERRNO (_ret, ));			      \
+	_ret = -1L;							      \
       }									      \
   out:									      \
     (int) _ret;								      \
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
index bb61e894f1..41d8143896 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -33,12 +33,11 @@
 .text
 ENTRY(__syscall_error)
 #ifndef PIC
-# if USE___THREAD
-#  ifndef NOT_IN_libc
-#   define SYSCALL_ERROR_ERRNO __libc_errno
-#  else
-#   define SYSCALL_ERROR_ERRNO errno
-#  endif
+# ifndef NOT_IN_libc
+#  define SYSCALL_ERROR_ERRNO __libc_errno
+# else
+#  define SYSCALL_ERROR_ERRNO errno
+# endif
 	basr	%r1,0
 0:	lg	%r1,1f-0b(%r1)
 	ear	%r3,%a0
@@ -49,29 +48,6 @@ ENTRY(__syscall_error)
 	lghi	%r2,-1
 	br	%r14
 1:	.quad	SYSCALL_ERROR_ERRNO@ntpoff
-# elif !defined _LIBC_REENTRANT
-	larl	%r1,errno
-	lcr	%r2,%r2
-	st	%r2,0(%r1)
-	lghi	%r2,-1
-	br	%r14
-# else
-	stmg	%r13,%r15,104(%r15)
-	cfi_offset (%r15,-40)
-	cfi_offset (%r14,-48)
-	cfi_offset (%r13,-56)
-	lgr	%r0,%r15
-	aghi	%r15,-160
-	cfi_adjust_cfa_offset (160)
-	lcr	%r13,%r2
-	stg	%r0,0(%r15)
-	brasl	%r14,__errno_location
-	st	%r13,0(%r2)
-	lmg	%r13,%r15,264(%r15)
-	cfi_adjust_cfa_offset (-160)
-	lghi	%r2,-1
-	br	%r14
-#endif
 #else
 # if RTLD_PRIVATE_ERRNO
 	larl	%r1,rtld_errno
@@ -79,7 +55,7 @@ ENTRY(__syscall_error)
 	st	%r2,0(%r1)
 	lghi	%r2,-1
 	br	%r14
-# elif USE___THREAD
+# else
 #  ifndef NOT_IN_libc
 #   define SYSCALL_ERROR_ERRNO __libc_errno
 #  else
@@ -94,29 +70,6 @@ ENTRY(__syscall_error)
 	st	%r2,0(%r1,%r3)
 	lghi	%r2,-1
 	br	%r14
-# elif !defined _LIBC_REENTRANT
-	larl	%r1,_GLOBAL_OFFSET_TABLE_
-	lg	%r1,errno@GOT(%r1)
-	lcr	%r2,%r2
-	st	%r2,0(%r1)
-	lghi	%r2,-1
-	br	%r14
-# else
-	stmg	%r13,%r15,104(%r15)
-	cfi_offset (%r15,-40)
-	cfi_offset (%r14,-48)
-	cfi_offset (%r13,-56)
-	lgr	%r0,%r15
-	aghi	%r15,-160
-	cfi_adjust_cfa_offset (160)
-	lcr	%r13,%r2
-	stg	%r0,0(%r15)
-	brasl	%r14,__errno_location@PLT
-	st	%r13,0(%r2)
-	lmg	%r13,%r15,264(%r15)
-	cfi_adjust_cfa_offset (-160)
-	lghi	%r2,-1
-	br	%r14
 # endif
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index 4d45417639..598fb86529 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -1,5 +1,5 @@
 /* Assembler macros for 64 bit S/390.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2011
    Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
@@ -115,14 +115,13 @@
     lghi  %r2,-1;							      \
     br    %r14
 # 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_LABEL 0f
-#   define SYSCALL_ERROR_HANDLER \
+#  ifndef NOT_IN_libc
+#   define SYSCALL_ERROR_ERRNO __libc_errno
+#  else
+#   define SYSCALL_ERROR_ERRNO errno
+#  endif
+#  define SYSCALL_ERROR_LABEL 0f
+#  define SYSCALL_ERROR_HANDLER \
 0:  lcr   %r0,%r2;							      \
     larl  %r1,SYSCALL_ERROR_ERRNO@indntpoff;				      \
     lg    %r1,0(%r1);							      \
@@ -132,10 +131,6 @@
     st    %r0,0(%r1,%r2);						      \
     lghi   %r2,-1;							      \
     br    %r14
-#  else
-#   define SYSCALL_ERROR_LABEL syscall_error@plt
-#   define SYSCALL_ERROR_HANDLER
-#  endif
 # else
 #  define SYSCALL_ERROR_LABEL 0f
 #  define SYSCALL_ERROR_HANDLER \
@@ -319,8 +314,8 @@
     if (INTERNAL_SYSCALL_ERROR_P (_ret, ))				      \
       {									      \
       iserr:								      \
-        __set_errno (INTERNAL_SYSCALL_ERRNO (_ret, ));			      \
-        _ret = -1L;							      \
+	__set_errno (INTERNAL_SYSCALL_ERRNO (_ret, ));			      \
+	_ret = -1L;							      \
       }									      \
   out:									      \
     (int) _ret;								      \