What is the logic to use the LFENCE after the STORE when using C++11-std::memory_order_seq_cst? (STORE+MFENCE = STORE+LFENCE+SFENCE)

Алексей Анатольевич alexeyab84@gmail.com
Sun Sep 29 20:22:00 GMT 2013


Hello.

Can you help me for one question?
GCC uses LOAD(without fence) and STORE+MFENCE for SC(Sequential
Consistency). As we know MFENCE is equivalent to LFENCE+SFENCE, then GCC
uses LOAD(without fence) and STORE+LFENCE+SFENCE for SC when using
C++11-std::memory_order_seq_cst.
But what is the logic to use the LFENCE after the STORE?
(STORE+MFENCE = STORE+LFENCE+SFENCE)

In more detail:
http://stackoverflow.com/questions/19047327/why-gcc-does-not-use-loadwithout-fence-and-storesfence-for-stdmemory-order

Best regards,
Alexey Bochkovskiy



More information about the Gcc-help mailing list