On 4 Jun 2012, at 11:00, Tijl Coosemans wrote:

> On 02-06-2012 20:10, Konstantin Belousov wrote:
>> Author: kib
>> Date: Sat Jun  2 18:10:16 2012
>> New Revision: 236456
>> URL: http://svn.freebsd.org/changeset/base/236456
>> 
>> Log:
>>  Use plain store for atomic_store_rel on x86, instead of implicitly
>>  locked xchg instruction.  IA32 memory model guarantees that store has
>>  release semantic, since stores cannot pass loads or stores.
> 
> They can pass non-temporal stores can't they?

Now that we have support for C11 atomics via stdatomic.h (in current and 
stable), it would be nice to compare their performance with the assembly 
versions.  There is the potential for greater optimisation, because the 
compiler treats any asm block as a full barrier, so only the CPU, not the 
compiler, can reorder loads and stores across it.  With the C11 stuff, on a new 
compiler (clang or gcc 4.7), the compiler can perform any reordering of loads 
and stores that does not violate the semantics specified by the atomic 
operation.

David_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to