Re: [Gc] Re: [libatomic_ops] bug with gcc/x86_64/CAS

Ivan Maidanski ivmai at mail.ru
Thu Feb 18 20:54:03 PST 2010


Hi!
ludo at gnu.org (Ludovic CourtХs) wrote:
> Andrew Haley <aph at redhat.com> writes:
> 
> > On 02/18/2010 04:23 PM, John Plevyak wrote:
> >> FYI: GCC has supported the __sync_ primitives from 4.1
> >> http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
> >> 
> >> It looks like the major targets are supported by the end of 4.1.X,
> >> PowerPC, Alpha, ARM, SPARC, MIPS, etc.
> >
> > Be very, very careful when you say things like this: I recently [1] fixed
> > __sync_synchronize on ARM, which didn't generate any code!
> >
> > Andrew.
> > [1] http://gcc.gnu.org/ml/gcc-patches/2009-08/msg00600.html
> 
> Not to mention x86_64 [2]...
> 
> Ludo'.
> 
> [2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793

After reading [2], the Q is:
is our asm implementation correct?

And if the described fix is critical to our AO_CAS_full() then we should __sync_... only if gcc v4.4+ (since some 4.3 versions seem to contain unfixed __sync_...).

Bye.


More information about the Gc mailing list