This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/50123] cmpxchg generated for atomic and with zero/or with -1
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Aug 2011 06:53:18 +0000
- Subject: [Bug target/50123] cmpxchg generated for atomic and with zero/or with -1
- Auto-submitted: auto-generated
- References: <bug-50123-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50123
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aldyh at gcc dot gnu.org,
| |amacleod at redhat dot com,
| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-19 06:53:18 UTC ---
While we could do this on i?86/x86_64 now, it sounds better to do it in the
generic code (folding or expansion), but for that we need to wait for the
extended sync builtins that are currently brewing on cxx-mem-model branch
(because __sync_fetch_and_{and,or} are full barriers, while __sync_test_and_set
is not).