[Bug middle-end/51766] [4.7 regression] sync_fetch_and_xxx atomicity

dje at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 10 18:09:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51766

--- Comment #8 from David Edelsohn <dje at gcc dot gnu.org> 2012-01-10 18:08:23 UTC ---
For the way that programmers use __sync_* builtins, release or acquire-release
semantics are sufficient.  As we see in libstdc++, release semantics are overly
strict when incrementing the reference, as opposed to destroying an object.

Again, there is no cost to Intel specifying sequential consistency as opposed
to a slightly weaker memory model.  Intel chose a memory model that matched and
benefited their architecture.  IBM should have the freedom to choose memory
models that benefit its architectures.



More information about the Gcc-bugs mailing list