This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add x32 support to tcbhead_t


On Mon, May 14, 2012 at 7:37 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> -# 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)));
>
> Space between 'aligned' and paren.
>
>> ? ?void *__padding[8];
>
> With the space nit this change is OK.

I checked it in with space change.

> But while we're here, does anyone know why we have __private_tm, __unused2,
> and __padding fields here at all??
>
> This is a private internal structure, not part of the real ABI. ?(Unless
> I'm confused, it's only part of the GLIBC_PRIVATE ABI between libc and
> libpthread.) ?Only the first word is part of the TLS ABI, so why do we have
> all these apparent attempts at future-proofing in the rest of the
> structure?
>

GCC i386.h has

/* We steal the last transactional memory word.  */
#define TARGET_CAN_SPLIT_STACK
#define TARGET_THREAD_SPLIT_STACK_OFFSET \
  (TARGET_64BIT ? (TARGET_X32 ? 0x40 : 0x70) : 0x30)
#endif

So we can't change __private_tm.  I believe __unused2 is used
to pad rtld_savespace_sse to 32 byte offset.


-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]