[cpp-threads] Brief tentative example x86 Implementation for C/C++ Memory Model
Alexander Terekhov
alexander.terekhov at gmail.com
Tue Dec 23 22:40:46 GMT 2008
(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?
TIA.
regards,
alexander.
More information about the cpp-threads
mailing list