https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68945
--- Comment #12 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> --- > --- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- [...] >> * One thing I wonder about is runtime/config/sparc/os-fence.h: when using >> __sync_synchronize, gcc emits membar #StoreLoad, while Stefan's patch had >> membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad. It seems that >> all but #StoreLoad are no-ops for TSO SPARC CPUs, but I'd better get this >> right. > > __sync_synchronize emits the minimum memory barrier for the memory model, > which > is TSO on Solaris so only #StoreLoad is needed. The 4 flags are needed for > RMO > theoretically, but I'm not sure RMO ever existed in real life. Ok, so I'll keep the __sync_synchronize and inline asm versions in sync and submit the result upstream. Thanks. Rainer