sequentially-consistent atomic load on x86

Posted by axe on Stack Overflow See other posts from Stack Overflow or by axe
Published on 2011-02-11T17:26:58Z Indexed on 2011/02/17 7:25 UTC
Read the original article Hit count: 193

Filed under:
|
|
|

Hello all,

I'm interested in sequentially-consistent load operation on x86. As far as I see from assembler listing, generated by compiler it is implemented as a plain load on x86, however plain loads as far as I know guaranteed to have acquire semantics, while plain stores are guaranteed to have release. Sequentially-consistent store is implemented as locked xchg, while load as plain load. That sounds strange to me, could you please explain this in details?

added

Just found in internet, that sequentially-consistent atomic load could be done as simple mov as long as store is done with locked xchg, but there was no prove and no links to documentation. Do you know where can I read about that?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about assembly

Related posts about load