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 Tue, Jan 22, 2002 at 09:31:36PM +0100, Franz Sirl wrote:
> 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.
You'll have to use alloca plus extra arithmetic to get this.
> the PPC "machine" needs a cache line aligned "type" for a lock
Define "needs".
The way this works on Alpha is that cache lines define the unit that
is shared between two processors, so if you have two locks on the
same cache line you can theoretically ping the line between them and
make no progress. But the lock itself does not need to be aligned.
I would have suspected the same for ppc, since I can't imagine how
else it would be implemented in hardware.
r~