]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
C-SKY: Define HAVE_sync_compare_and_swap*.
authorCooper Qu <cooper.qu@linux.alibaba.com>
Fri, 28 May 2021 09:02:05 +0000 (17:02 +0800)
committerXianmiao Qu <xianmiao_qu@c-sky.com>
Fri, 28 May 2021 10:05:27 +0000 (18:05 +0800)
The SYNC operations are implemented as library functions, not
NSN patterns.  As a result, the HAVE defines for the patterns are
not defined.  We need to define them to generate the corresponding
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_* and __GCC_ATOMIC_*_LOCK_FREE
defines.

gcc/
* config/csky/csky-linux-elf.h (HAVE_sync_compare_and_swapqi):
Defined.
(HAVE_sync_compare_and_swaphi): Likewise.
(HAVE_sync_compare_and_swapsi): Likewise.

gcc/config/csky/csky-linux-elf.h

index 58a1f3978b1810027b6c37adc6ccff0ad9e08f69..e94eb8c579ebf9a2f5d3157eff4bf0175002d8cf 100644 (file)
 #ifdef IN_LIBGCC2
 extern int cacheflush (void *__addr, const int __nbytes, const int __op);
 #endif
+
+/* The SYNC operations are implemented as library functions, not
+   INSN patterns.  As a result, the HAVE defines for the patterns are
+   not defined.  We need to define them to generate the corresponding
+   __GCC_HAVE_SYNC_COMPARE_AND_SWAP_* and __GCC_ATOMIC_*_LOCK_FREE
+   defines.  */
+
+#define HAVE_sync_compare_and_swapqi 1
+#define HAVE_sync_compare_and_swaphi 1
+#define HAVE_sync_compare_and_swapsi 1