[cpp-threads] Brief tentative example x86 Implementation for C/C++ Memory Model

Paul E. McKenney paulmck at linux.vnet.ibm.com
Wed Dec 24 16:44:13 GMT 2008


On Tue, Dec 23, 2008 at 11:40:46PM +0100, Alexander Terekhov wrote:
> (cmpxchg aside for a moment)
> 
> Load Relaxed:  MOV (from memory)
> Load Consume:  MOV (from memory)
> Load Acquire:  MOV (from memory)
> Load Seq_Cst:  LOCK XADD(0) // alternative: MFENCE,MOV (from memory)
> Store Relaxed: MOV (into memory)
> Store Release: MOV (into memory)
> Store Seq Cst: LOCK XCHG    // alternative: MOV (into memory),MFENCE
> Consume Fence: <ignore>
> Acquire Fence: <ignore>
> Release Fence: <ignore>
> Acq_Rel Fence: <ignore>
> Seq_Cst Fence: MFENCE
> 
> Any objections and/or questions?

This matches what I know about x86, but it would be good to get official
Intel/AMD response to it.

							Thanx, Paul



More information about the cpp-threads mailing list