|
|
4999bf |
2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
|
|
|
4999bf |
|
|
|
4999bf |
[BZ #12113]
|
|
|
4999bf |
* sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
|
|
|
4999bf |
* sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
|
|
|
4999bf |
of "struct pthread".
|
|
|
4999bf |
|
|
|
4999bf |
Index: glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/pthreaddef.h
|
|
|
4999bf |
===================================================================
|
|
|
4999bf |
--- glibc-2.12-2-gc4ccff1.orig/nptl/sysdeps/x86_64/pthreaddef.h
|
|
|
4999bf |
+++ glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/pthreaddef.h
|
|
|
4999bf |
@@ -27,8 +27,9 @@
|
|
|
4999bf |
/* Minimal stack size after allocating thread descriptor and guard size. */
|
|
|
4999bf |
#define MINIMAL_REST_STACK 2048
|
|
|
4999bf |
|
|
|
4999bf |
-/* Alignment requirement for TCB. */
|
|
|
4999bf |
-#define TCB_ALIGNMENT 16
|
|
|
4999bf |
+/* Alignment requirement for TCB. Need to store post-AVX vector registers
|
|
|
4999bf |
+ in the TCB and we want the storage to be aligned at 32-byte. */
|
|
|
4999bf |
+#define TCB_ALIGNMENT 32
|
|
|
4999bf |
|
|
|
4999bf |
|
|
|
4999bf |
/* Location of current stack frame. The frame pointer is not usable. */
|
|
|
4999bf |
Index: glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/tls.h
|
|
|
4999bf |
===================================================================
|
|
|
4999bf |
--- glibc-2.12-2-gc4ccff1.orig/nptl/sysdeps/x86_64/tls.h
|
|
|
4999bf |
+++ glibc-2.12-2-gc4ccff1/nptl/sysdeps/x86_64/tls.h
|
|
|
4999bf |
@@ -117,12 +117,7 @@ typedef struct
|
|
|
4999bf |
# define TLS_TCB_SIZE sizeof (struct pthread)
|
|
|
4999bf |
|
|
|
4999bf |
/* Alignment requirements for the TCB. */
|
|
|
4999bf |
-//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
|
|
|
4999bf |
-// Normally the above would be correct But we have to store post-AVX
|
|
|
4999bf |
-// vector registers in the TCB and we want the storage to be aligned.
|
|
|
4999bf |
-// unfortunately there isn't yet a type for these values and hence no
|
|
|
4999bf |
-// 32-byte alignment requirement. Make this explicit, for now.
|
|
|
4999bf |
-# define TLS_TCB_ALIGN 32
|
|
|
4999bf |
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
|
|
|
4999bf |
|
|
|
4999bf |
/* The TCB can have any size and the memory following the address the
|
|
|
4999bf |
thread pointer points to is unspecified. Allocate the TCB there. */
|