atomic: Create and use maybe_emit_atomic_test_and_set.
* optabs.c (CODE_FOR_atomic_test_and_set): Provide default.
(maybe_emit_atomic_test_and_set): New.
(expand_sync_lock_test_and_set): Use it.
(expand_atomic_test_and_set): Likewise.
* doc/extend.texi (__atomic_test_and_set): Adjust the docs to match
the implementation; clarify implementation defined details.
* doc/md.texi (atomic_test_and_set): Document.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183483
138bc75d-0d04-0410-961f-
82ee72b054a4