diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2010-10-13 22:12:03 -0400 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2010-10-26 15:18:03 +0200 |
commit | 9f51ea274f3166989a24629ef43c3d1b273ac56a (patch) | |
tree | 05e2df01740d3ff15d0490246681656300dee207 | |
parent | fc0ed7b647474cdd16efe8cbbc9eb9ccf8a7b3c8 (diff) | |
download | glibc-9f51ea274f3166989a24629ef43c3d1b273ac56a.zip glibc-9f51ea274f3166989a24629ef43c3d1b273ac56a.tar.gz glibc-9f51ea274f3166989a24629ef43c3d1b273ac56a.tar.bz2 |
Fix alignment of AVX safe area on x86-64.
(cherry picked from commit f90681487d90a6eea8f1c60021bc8dd83313c59b)
-rw-r--r-- | nptl/ChangeLog | 7 | ||||
-rw-r--r-- | nptl/sysdeps/x86_64/pthreaddef.h | 5 | ||||
-rw-r--r-- | nptl/sysdeps/x86_64/tls.h | 7 |
3 files changed, 11 insertions, 8 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 49ead51..3da761a 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -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 diff --git a/nptl/sysdeps/x86_64/pthreaddef.h b/nptl/sysdeps/x86_64/pthreaddef.h index be63a8c..8ec135c 100644 --- a/nptl/sysdeps/x86_64/pthreaddef.h +++ b/nptl/sysdeps/x86_64/pthreaddef.h @@ -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. */ diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index e39eb5f..41b5e6d 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -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. */ |