question regarding atomicity.h on powerpc

Geoff Keating geoffk@geoffk.org
Tue Jul 8 21:55:00 GMT 2003


Marcus Meissner <meissner@suse.de> writes:

> Hi,
> 
> I just checked libstdc++-v3/config/cpu/powerpclibstdc++-v3/config/cpu/powerpc/atomicity.h
> in GCC head CVS (upcoming 3.4).
> 
> The asm constructs are probably missing an "isync" after the last "bne".
> 
> And both are probably missing an "lwsync" or "eieio" before the loop to
> sync the out of order data stores.

I don't think these primitives need it.  They don't need to be
synchronised with anything other than themselves.  If they were being
used to establish a lock or something, they'd need a full 'sync ;
isync' afterwards, but they're not, they're true atomic adds.

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc mailing list