Date: Fri, 1 Sep 2006 11:44:49 -0700 From: Marcel Moolenaar <xcllnt@mac.com> To: Peter Grehan <grehan@freebsd.org> Cc: ppc@freebsd.org Subject: Re: Status of threading and TLS Message-ID: <49A44B45-780B-462D-AB1E-547E87460208@mac.com> In-Reply-To: <44F87E8C.9000705@freebsd.org> References: <933C0437-DDF8-4A61-83BA-F4920D9E6E96@mac.com> <44F87E8C.9000705@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 1, 2006, at 11:40 AM, Peter Grehan wrote: > Hi Marcel, > >> If anyone has any suggestions why for libpthread we end up >> with r2 off by 8 bytes, I'm happy to hear it... > > I don't have access to a PPC machine at the moment, but would it > have anything to do with: > > struct ppc32_tp { > void *tp_dtv; /* dynamic thread vector */ > uint32_t _reserved_; > double tp_tls[0]; /* static TLS */ > }; > > I think the last element was put in for alignment, but would that > possibly have an effect somewhere else, in that it's forcing an 8- > byte pad somewhere ? I've been thinking about that too. I played with the following definition to see if it made a difference: union ppc32_tp { void *tp_ptr[2]; double _align_; }; It didn't make a difference :-/ Note that I use the same on ia64, except that on ia64 we need it aligned on a 16-byte boundary. Hence, the definition is: struct ia64_tp { void *tp_dtv; uint64_t _reserved_; long double tp_tls[0]; } It doesn't cause problems on ia64... -- Marcel Moolenaar xcllnt@mac.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49A44B45-780B-462D-AB1E-547E87460208>