[Glibc-bsd-commits] r4410 - in trunk/glibc-ports/kfreebsd: i386 i386/linuxthreads x86_64

Aurelien Jarno aurel32 at alioth.debian.org
Tue May 7 22:25:57 UTC 2013


Author: aurel32
Date: 2013-05-07 22:25:57 +0000 (Tue, 07 May 2013)
New Revision: 4410

Modified:
   trunk/glibc-ports/kfreebsd/i386/linuxthreads/sysdep-cancel.h
   trunk/glibc-ports/kfreebsd/i386/sysdep.h
   trunk/glibc-ports/kfreebsd/x86_64/sysdep.h
Log:
Remove code to handle !USE___THREAD


Modified: trunk/glibc-ports/kfreebsd/i386/linuxthreads/sysdep-cancel.h
===================================================================
--- trunk/glibc-ports/kfreebsd/i386/linuxthreads/sysdep-cancel.h	2013-05-07 21:17:00 UTC (rev 4409)
+++ trunk/glibc-ports/kfreebsd/i386/linuxthreads/sysdep-cancel.h	2013-05-07 22:25:57 UTC (rev 4410)
@@ -110,7 +110,7 @@
 #endif
 
 # ifndef __ASSEMBLER__
-#  if defined FLOATING_STACKS && USE___THREAD && defined PIC
+#  if defined FLOATING_STACKS && defined PIC
 #   define SINGLE_THREAD_P \
   __builtin_expect (THREAD_GETMEM (THREAD_SELF,				      \
 				   p_header.data.multiple_threads) == 0, 1)
@@ -126,7 +126,7 @@
 # else
 #  if !defined PIC
 #   define SINGLE_THREAD_P cmpl $0, __local_multiple_threads
-#  elif defined FLOATING_STACKS && USE___THREAD
+#  elif defined FLOATING_STACKS
 #   define SINGLE_THREAD_P cmpl $0, %gs:MULTIPLE_THREADS_OFFSET
 #  else
 #   if !defined NOT_IN_libc || defined IS_IN_libpthread
@@ -136,7 +136,7 @@
   movl __local_multiple_threads at GOT(%ecx), %ecx;\
   cmpl $0, (%ecx)
 #   endif
-#   if !defined HAVE_HIDDEN || !USE___THREAD
+#   if !defined HAVE_HIDDEN
 #    define SINGLE_THREAD_P \
   SETUP_PIC_REG (cx);				\
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;		\

Modified: trunk/glibc-ports/kfreebsd/i386/sysdep.h
===================================================================
--- trunk/glibc-ports/kfreebsd/i386/sysdep.h	2013-05-07 21:17:00 UTC (rev 4409)
+++ trunk/glibc-ports/kfreebsd/i386/sysdep.h	2013-05-07 22:25:57 UTC (rev 4410)
@@ -96,49 +96,25 @@
 
 # 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					      \
 0:SETUP_PIC_REG (cx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
   movl SYSCALL_ERROR_ERRNO at GOTNTPOFF(%ecx), %ecx;			      \
   SYSCALL_ERROR_HANDLER_TLS_STORE (%eax, %ecx);				      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
-#   ifndef NO_TLS_DIRECT_SEG_REFS
-#    define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff)		      \
+#  ifndef NO_TLS_DIRECT_SEG_REFS
+#   define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff)		      \
   movl src, %gs:(destoff)
-#   else
-#    define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff)		      \
+#  else
+#   define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff)		      \
   addl %gs:0, destoff;							      \
   movl src, (destoff)
-#   endif
-#  else
-#   define SYSCALL_ERROR_HANDLER					      \
-0:pushl %ebx;								      \
-  cfi_adjust_cfa_offset (4);                                                  \
-  cfi_rel_offset (ebx, 0);                                                    \
-  SETUP_PIC_REG (bx);							      \
-  addl $_GLOBAL_OFFSET_TABLE_, %ebx;					      \
-  pushl %eax;								      \
-  cfi_adjust_cfa_offset (4);                                                  \
-  PUSH_ERRNO_LOCATION_RETURN;						      \
-  call BP_SYM (__errno_location)@PLT;					      \
-  POP_ERRNO_LOCATION_RETURN;						      \
-  popl %ecx;								      \
-  cfi_adjust_cfa_offset (-4);                                                 \
-  popl %ebx;								      \
-  cfi_adjust_cfa_offset (-4);                                                 \
-  cfi_restore (ebx);                                                          \
-  movl %ecx, (%eax);							      \
-  orl $-1, %eax;							      \
-  jmp L(pseudo_end);
-/* A quick note: it is assumed that the call to `__errno_location' does
-   not modify the stack!  */
 #  endif
 # else
 /* Store (%eax) into errno through the GOT.  */

Modified: trunk/glibc-ports/kfreebsd/x86_64/sysdep.h
===================================================================
--- trunk/glibc-ports/kfreebsd/x86_64/sysdep.h	2013-05-07 21:17:00 UTC (rev 4409)
+++ trunk/glibc-ports/kfreebsd/x86_64/sysdep.h	2013-05-07 22:25:57 UTC (rev 4410)
@@ -87,7 +87,7 @@
   movl %eax, (%rcx);				\
   orq $-1, %rax;				\
   jmp L(pseudo_end);
-#elif USE___THREAD
+#else
 # ifndef NOT_IN_libc
 #  define SYSCALL_ERROR_ERRNO __libc_errno
 # else
@@ -99,30 +99,6 @@
   movl %eax, %fs:(%rcx);			\
   orq $-1, %rax;				\
   jmp L(pseudo_end);
-#elif defined _LIBC_REENTRANT
-/* Store (%eax) into errno through the GOT.
-   Note that errno occupies only 4 bytes.  */
-# define SYSCALL_ERROR_HANDLER			\
-0:						\
-  pushq %rax;					\
-  cfi_adjust_cfa_offset(8);			\
-  PUSH_ERRNO_LOCATION_RETURN;			\
-  call BP_SYM (__errno_location)@PLT;		\
-  POP_ERRNO_LOCATION_RETURN;			\
-  popq %rdx;					\
-  cfi_adjust_cfa_offset(-8);			\
-  movl %edx, (%rax);				\
-  orq $-1, %rax;				\
-  jmp L(pseudo_end);
-
-/* A quick note: it is assumed that the call to `__errno_location' does
-   not modify the stack!  */
-#else /* Not _LIBC_REENTRANT.  */
-# define SYSCALL_ERROR_HANDLER			\
-0:movq errno at GOTPCREL(%RIP), %rcx;		\
-  movl %eax, (%rcx);				\
-  orq $-1, %rax;				\
-  jmp L(pseudo_end);
 #endif	/* PIC */
 
 /* The FreeBSD/amd64 kernel expects the system call parameters in




More information about the Glibc-bsd-commits mailing list