This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: new macro STARTING_FRAME_PHASE: alignment
On Tuesday 22 January 2002 20:42, Richard Henderson wrote:
> On Tue, Jan 22, 2002 at 08:39:22PM +0100, Franz Sirl wrote:
> > But it is possible to get properly aligned objects on the stack if I use
> > alloca, so why can't we make it work with automatic variables?
>
> Not 32-byte aligned you can't. Well, theoretically possible, but
> the alloca code doesn't handle it.
Hmm, I see. This means glibc threads are broken on PPC, cause AFAICS it
allocates a wait_node as an automatic variable, thus violating the alignment
rules for a lwarx/stwcx lock. I'm tempted to say that BIGGEST_ALIGNMENT is
wrong on PPC then (the gcc manual is a bit vague, "Biggest alignment that any
data type can require on this machine" doesn't strictly limit itself to ABI
defined types, the PPC "machine" needs a cache line aligned "type" for a
lock). The PPC ABI's should have required something like an atomic_t...
Franz.