[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r4098 - in glibc-package/branches/eglibc-2.11/debian: . patches patches/kfreebsd



Author: ps-guest
Date: 2010-01-18 20:33:57 +0000 (Mon, 18 Jan 2010)
New Revision: 4098

Added:
   glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-dosavesse.diff
   glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-nosavesse.diff
Modified:
   glibc-package/branches/eglibc-2.11/debian/changelog
   glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-amd64
   glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-i386
Log:
add kfreebsd/local-dosavesse.diff and kfreebsd/local-nosavesse.diff,
the former does not work so use the latter one



Modified: glibc-package/branches/eglibc-2.11/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/changelog	2010-01-18 20:27:07 UTC (rev 4097)
+++ glibc-package/branches/eglibc-2.11/debian/changelog	2010-01-18 20:33:57 UTC (rev 4098)
@@ -40,6 +40,9 @@
   * kfreebsd/local-sysdeps.diff: update to revision 2941 (from glibc-bsd).
   * define __rtld_lock_initialize also in linuxthreads <bits/libc-lock.h>
     variant (enhance local-linuxthreads-weak.diff).
+  * allow failure of tst-longjmp_chk.out on GNU/kFreeBSD
+  * Add kfreebsd/local-dosavesse.diff, which does not work,
+    so rather use also added kfreebsd/local-nosavesse.diff
  
  -- Aurelien Jarno <aurel32@debian.org>  Mon, 18 Jan 2010 01:10:49 +0100
 

Added: glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-dosavesse.diff
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-dosavesse.diff	                        (rev 0)
+++ glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-dosavesse.diff	2010-01-18 20:33:57 UTC (rev 4098)
@@ -0,0 +1,116 @@
+ unfortunately, it does not work
+ in mean time use local-nosavesse.diff 
+
+--- a/linuxthreads/descr.h
++++ b/linuxthreads/descr.h
+@@ -114,6 +114,7 @@
+   /* This overlaps tcbhead_t (see tls.h), as used for TLS without threads.  */
+   union
+   {
++    tcbhead_t tcbheader;
+     struct
+     {
+       void *tcb;		/* Pointer to the TCB.  This is not always
+--- a/linuxthreads/sysdeps/x86_64/tcb-offsets.sym
++++ b/linuxthreads/sysdeps/x86_64/tcb-offsets.sym
+@@ -3,3 +3,4 @@
+ 
+ MULTIPLE_THREADS_OFFSET		offsetof (tcbhead_t, multiple_threads)
+ POINTER_GUARD			offsetof (tcbhead_t, pointer_guard)
++RTLD_SAVESPACE_SSE		offsetof (tcbhead_t, rtld_savespace_sse)
+--- a/linuxthreads/sysdeps/x86_64/tls.h
++++ b/linuxthreads/sysdeps/x86_64/tls.h
+@@ -26,6 +26,7 @@
+ # include <stdbool.h>
+ # include <stddef.h>
+ # include <stdint.h>
++# include <xmmintrin.h>
+ 
+ /* Type for the dtv.  */
+ typedef union dtv
+@@ -46,6 +47,7 @@
+   dtv_t *dtv;
+   void *self;		/* Pointer to the thread descriptor.  */
+   int multiple_threads;
++  int __unused1;
+   uintptr_t sysinfo;
+   uintptr_t stack_guard;
+   uintptr_t pointer_guard;
+@@ -53,7 +55,13 @@
+   long gscope_flag;
+ # else
+   int gscope_flag;
++  int __unused2;
+ # endif
++  void *__padding1[7];
++  int rtld_must_xmm_save;
++  int __unused3;
++   /* Have space for the post-AVX register size.  */
++  __m128 rtld_savespace_sse[8][4];
+ } tcbhead_t;
+ 
+ #else /* __ASSEMBLER__ */
+@@ -77,13 +85,19 @@
+ #  define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+ 
+ /* Alignment requirements for the initial TCB.  */
+-#  define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
++//#  define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
++// Normally the above would be correct  But we have to store post-AVX
++// vector registers in the TCB and we want the storage to be aligned.
++// unfortunately there isn't yet a type for these values and hence no
++// 32-byte alignment requirement.  Make this explicit, for now.
++#  define TLS_INIT_TCB_ALIGN 32
+ 
+ /* This is the size of the TCB.  */
+ #  define TLS_TCB_SIZE sizeof (struct _pthread_descr_struct)
+ 
+ /* Alignment requirements for the TCB.  */
+ #  define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)
++// It is already 32B aligned
+ 
+ /* The TCB can have any size and the memory following the address the
+    thread pointer points to is unspecified.  Allocate the TCB there.  */
+@@ -189,7 +203,42 @@
+ #define THREAD_GSCOPE_WAIT() \
+   do { /* GL(dl_wait_lookup_done) () */ } while (0)
+ 
++
++# ifdef SHARED
++/* Defined in dl-trampoline.S.  */
++extern void _dl_x86_64_save_sse (void);
++extern void _dl_x86_64_restore_sse (void);
++
++# define RTLD_CHECK_FOREIGN_CALL \
++  (THREAD_GETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save) != 0)
++
++/* NB: Don't use the xchg operation because that would imply a lock
++   prefix which is expensive and unnecessary.  The cache line is also
++   not contested at all.  */
++#  define RTLD_ENABLE_FOREIGN_CALL \
++  int old_rtld_must_xmm_save = THREAD_GETMEM (THREAD_SELF,		      \
++					      p_header.tcbheader.rtld_must_xmm_save); \
++  THREAD_SETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save, 1)
++
++#  define RTLD_PREPARE_FOREIGN_CALL \
++  do if (THREAD_GETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save))  \
++    {									      \
++      _dl_x86_64_save_sse ();						      \
++      THREAD_SETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save, 0);  \
++    }									      \
++  while (0)
++
++#  define RTLD_FINALIZE_FOREIGN_CALL \
++  do {									      \
++    if (THREAD_GETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save) == 0) \
++      _dl_x86_64_restore_sse ();					      \
++    THREAD_SETMEM (THREAD_SELF, p_header.tcbheader.rtld_must_xmm_save,	      \
++		   old_rtld_must_xmm_save);				      \
++  } while (0)
++# endif
++
+ # endif	/* HAVE_TLS_SUPPORT */
++
+ #endif /* __ASSEMBLER__ */
+ 
+ #endif	/* tls.h */

Added: glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-nosavesse.diff
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-nosavesse.diff	                        (rev 0)
+++ glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-nosavesse.diff	2010-01-18 20:33:57 UTC (rev 4098)
@@ -0,0 +1,14 @@
+
+ similar to 2.10 code
+
+--- a/sysdeps/x86_64/dl-trampoline.S
++++ b/sysdeps/x86_64/dl-trampoline.S
+@@ -163,7 +163,7 @@
+ #endif
+ 
+ 
+-#ifdef SHARED
++#if defined(SHARED) && defined(__linux__)
+ 	.globl _dl_x86_64_save_sse
+ 	.type _dl_x86_64_save_sse, @function
+ 	.align 16

Modified: glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-amd64
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-amd64	2010-01-18 20:27:07 UTC (rev 4097)
+++ glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-amd64	2010-01-18 20:33:57 UTC (rev 4098)
@@ -1,6 +1,7 @@
 kfreebsd/local-config_h_in.patch
 kfreebsd/local-ftw.diff
 kfreebsd/local-linuxthreads29.diff
+kfreebsd/local-nosavesse.diff
 kfreebsd/local-memusage_no_mremap.diff
 kfreebsd/local-no-SOCK_NONBLOCK.diff
 kfreebsd/local-pthread_at_fork.diff

Modified: glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-i386
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-i386	2010-01-18 20:27:07 UTC (rev 4097)
+++ glibc-package/branches/eglibc-2.11/debian/patches/series.kfreebsd-i386	2010-01-18 20:33:57 UTC (rev 4098)
@@ -1,6 +1,7 @@
 kfreebsd/local-config_h_in.patch
 kfreebsd/local-ftw.diff
 kfreebsd/local-linuxthreads29.diff
+kfreebsd/local-nosavesse.diff
 kfreebsd/local-memusage_no_mremap.diff
 kfreebsd/local-no-SOCK_NONBLOCK.diff
 kfreebsd/local-pthread_at_fork.diff


Reply to: