This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86-64: Align the stack in __tls_get_addr [BZ #21609]
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: libc-alpha at sourceware dot org, nmiell at gmail dot com, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 4 Jul 2017 06:47:51 +0200
- Subject: Re: [PATCH] x86-64: Align the stack in __tls_get_addr [BZ #21609]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 737E9C049D59
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 737E9C049D59
- References: <f5ac0827-0c3a-cc1d-eb14-6efb905bd53d@redhat.com> <14a88e5f-a8c6-cd78-a363-1368d175f605@redhat.com> <20170703202551.GA17398@gmail.com>
On 07/03/2017 10:25 PM, H.J. Lu wrote:
> I prefer to let GCC realign the stack for us. What do you think?
I tried that first, but it does not work with all the GCC versions we
support. We would have to add a configure check and hope that older GCC
versions never generate code which needs an aligned stack.
Furthermore, the code GCC generates for stack realignment is really bad,
and __tls_get_addr appears to be quite performance-critical because not
all callers cache the result.
Thanks,
Florian