]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix alignment of AVX safe area on x86-64.
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 14 Oct 2010 02:12:03 +0000 (22:12 -0400)
committerPetr Baudis <pasky@suse.cz>
Mon, 1 Nov 2010 21:27:07 +0000 (22:27 +0100)
(cherry picked from commit f90681487d90a6eea8f1c60021bc8dd83313c59b)

nptl/ChangeLog
nptl/sysdeps/x86_64/pthreaddef.h
nptl/sysdeps/x86_64/tls.h

index dc3b4dcd27051992da468f48e4a64f02b8828b87..bb2e5dc684df1127095c3f63510b7fbae56c17ae 100644 (file)
@@ -1,3 +1,10 @@
+2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #12113]
+       * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
+       * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
+       of "struct pthread".
+
 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
 
        * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
index be63a8c74ac5c4cece83532dd8a3583210bb4908..8ec135c048a9eee20153093298dbc3ffcf19d059 100644 (file)
@@ -27,8 +27,9 @@
 /* Minimal stack size after allocating thread descriptor and guard size.  */
 #define MINIMAL_REST_STACK     2048
 
-/* Alignment requirement for TCB.  */
-#define TCB_ALIGNMENT          16
+/* Alignment requirement for TCB.  Need to store post-AVX vector registers
+   in the TCB and we want the storage to be aligned at 32-byte.  */
+#define TCB_ALIGNMENT          32
 
 
 /* Location of current stack frame.  The frame pointer is not usable.  */
index e39eb5f69d4c469badac738099edcc81b253577c..41b5e6daa235d974bd0b0178238faff693295c2a 100644 (file)
@@ -117,12 +117,7 @@ typedef struct
 # define TLS_TCB_SIZE sizeof (struct pthread)
 
 /* Alignment requirements for the TCB.  */
-//# define TLS_TCB_ALIGN __alignof__ (struct pthread)
-// 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_TCB_ALIGN 32
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
 
 /* The TCB can have any size and the memory following the address the
    thread pointer points to is unspecified.  Allocate the TCB there.  */