http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56028
Pawel Sikora <pluto at agmk dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pluto at agmk dot net --- Comment #7 from Pawel Sikora <pluto at agmk dot net> 2013-01-18 18:23:27 UTC --- (In reply to comment #6) > The fact that a data-race-free program cannot observe the non-atomicity of a > 64-bit store, though true, is beside the point. The plain fact is that > hardware registers (for which volatile was intended) really do care about the > size of the store. A pair of 32-bit stores does not necessarily mean the same > thing to hardware as does a single 64-bit store. Given that C is intended to > be used for device drivers, volatile stores of reasonably-sized basic types > must be atomic, and on 64-bit systems, "reasonably-sized" very clearly > includes > 64-bit stores. even 'movq' on x86-64 could be split into 32-bit transfers by mainboard h/w. devices connected to x86-64 should be aware of this! btw, iirc the x87-fpu load/store can give you atomic 64-bit transfer.