http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53020
--- Comment #1 from Yukhin Kirill <kirill.yukhin at intel dot com> 2012-04-17 16:23:26 UTC --- Instead, of single `locked` instruction, it generates:.L2: movl %eax, %ecx orl $1, %ecx lock cmpxchgl %ecx, (%edx) Similar variant for AND operation: lock andl %edx, (%eax)