https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |amonakov at gcc dot gnu.org Resolution|--- |INVALID --- Comment #6 from Alexander Monakov <amonakov at gcc dot gnu.org> --- There's a bit of a misunderstanding here, the -mcx16 option remains supported, and the compiler remains capable of issuing lock-cmpxchg16b for __sync builtins, in particular for __sync_val_compare_and_swap. What changed in gcc-7 is that __atomic builtins that would previously get expanded to a sequence involving cmpxchg16b now always yield a library call on x86, but libatomic tries to support that efficiently by using cmpxchg16b internally, on CPUs that have it and on targets that support IFUNC. No bug here, rather a (non-obvious imho) design change.