> The conversion of the __sync post-reload splitters was half > complete. Since there are nearly no restrictions on what may > appear between LL and SC, expand all the patterns immediatly. > This allows significantly easier code generation for subword > atomic operations.
On PowerPC/Linux, for: typedef __UINT64_TYPE__ uint64_t; uint64_t load (uint64_t *loc) { return __atomic_load_8 (loc, __ATOMIC_SEQ_CST); } the 4.7 compiler generates at -O: load: sync lwz 10,0(3) lwz 11,4(3) cmpw 7,10,10 bne- 7,$+4 isync mr 3,10 mr 4,11 blr Is that really an atomic load? -- Eric Botcazou