[Gc] Re: [libatomic_ops] bug with gcc/x86_64/CAS
hans.boehm at hp.com
Thu Feb 18 21:15:26 PST 2010
> -----Original Message-----
> From: Ivan Maidanski
> >  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793
> After reading , 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_...).
I'm glad to see that was fixed. It was certainly not the last one. (See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42869, for which I have't had a chance to check whether it still exists in SVN.)
I'm not quite sure what concern you have here. Cmpxchg includes the effect of an mfence, so this matters only if we use __sync_synchronize() , which we hopefully don't. (IIRC, on some Intel platforms, xchg seemed to be a slightly faster version of mfence.)
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc