This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov-profile/77378] [7 Regression] tree-profile and libgcov assume long long atomic operations are supported
- 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: Mon, 29 Aug 2016 10:50:49 +0000
- Subject: [Bug gcov-profile/77378] [7 Regression] tree-profile and libgcov assume long long atomic operations are supported
- Auto-submitted: auto-generated
- References: <bug-77378-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77378
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the preprocessor macro in this case would be
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
for SImode and
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
for DImode, and the compiler side should use a matching:
#ifndef HAVE_sync_compare_and_swapsi
#define HAVE_sync_compare_and_swapsi 0
#endif
#ifndef HAVE_atomic_compare_and_swapsi
#define HAVE_atomic_compare_and_swapsi 0
#endif
if (HAVE_sync_compare_and_swapsi || HAVE_atomic_compare_and_swapsi)
(or s/si/di/g) as in c-cppbuiltin.c.