This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Add x32 support to tcbhead_t
On Mon, May 14, 2012 at 12:31 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> __attribute__ ((aligned (32))) doesn't work on field of
>> a struct. ? You have to either manually pad it or use
>> an aligned type.
>
> The GCC manual contradicts this claim.
Here is the updated patch. There is
#if (RTLD_SAVESPACE_SSE % 32) != 0
# error RTLD_SAVESPACE_SSE must be aligned to 32 bytes
#endif
in sysdeps/x86_64/dl-trampoline.S. We will know if there is
a problem. Tested on Linux/x32 and Linux/x86-64. OK to install?
Thanks.
--
H.J.
---
* sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
(tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
to 32 bytes.
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 77f04f2..018331c 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -27,7 +27,6 @@
# include <stdlib.h>
# include <sysdep.h>
# include <kernel-features.h>
-# include <bits/wordsize.h>
# include <xmmintrin.h>
@@ -60,18 +59,14 @@ typedef struct
# else
int __unused1;
# endif
-# if __WORDSIZE == 64
int rtld_must_xmm_save;
-# endif
/* Reservation of some values for the TM ABI. */
void *__private_tm[5];
-# if __WORDSIZE == 64
long int __unused2;
/* Have space for the post-AVX register size. */
- __m128 rtld_savespace_sse[8][4];
+ __m128 rtld_savespace_sse[8][4] __attribute__((aligned(32)));
void *__padding[8];
-# endif
} tcbhead_t;
#else /* __ASSEMBLER__ */