This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/4] split-stack for powerpc64
- From: Alan Modra <amodra at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org, David Edelsohn <dje dot gcc at gmail dot com>
- Date: Mon, 18 May 2015 16:23:13 +0930
- Subject: Re: [PATCH 3/4] split-stack for powerpc64
- Authentication-results: sourceware.org; auth=none
- References: <20150518025234 dot GT6140 at bubble dot grove dot modra dot org> <20150518025451 dot GW6140 at bubble dot grove dot modra dot org>
On Mon, May 18, 2015 at 12:24:51PM +0930, Alan Modra wrote:
> + error ("%<-fsplit-stack%> currently only supported on PowerPC64 GNU/Linux with glibc-2.18 or later");
I forgot to comment on this. 2.19 is actually when __private_ss
appeared in the ppc tcbhead_t, but I misread the commit date and
thought it was 2.18. I was going to correct that, but then wondered
if glibc allocates any spare bytes, and it looks like it does. We
have a struct pthread before tcbhead_t, and struct pthread is aligned
according to TCB_ALIGNMENT which is 16 for powerpc. So 2.18's 56
byte tcbhead_t, which is laid out so that the end coincides with
tp-0x7000, must be preceded by 8 bytes of padding. Enough for
__private_ss, and we don't care if it isn't initially zero.
--
Alan Modra
Australia Development Lab, IBM