From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2050) id 8A745385381B; Fri, 28 May 2021 10:05:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A745385381B MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: qu To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-1110] C-SKY: Define HAVE_sync_compare_and_swap*. X-Act-Checkin: gcc X-Git-Author: Cooper Qu X-Git-Refname: refs/heads/master X-Git-Oldrev: c94424b0ed786ec92b6904da69af8b5243b34fdc X-Git-Newrev: f69a1aee157f496e6d3f373fff1b26b03bbf3409 Message-Id: <20210528100552.8A745385381B@sourceware.org> Date: Fri, 28 May 2021 10:05:52 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2021 10:05:52 -0000 https://gcc.gnu.org/g:f69a1aee157f496e6d3f373fff1b26b03bbf3409 commit r12-1110-gf69a1aee157f496e6d3f373fff1b26b03bbf3409 Author: Cooper Qu Date: Fri May 28 17:02:05 2021 +0800 C-SKY: Define HAVE_sync_compare_and_swap*. 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. Diff: --- gcc/config/csky/csky-linux-elf.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gcc/config/csky/csky-linux-elf.h b/gcc/config/csky/csky-linux-elf.h index 58a1f3978b1..e94eb8c579e 100644 --- a/gcc/config/csky/csky-linux-elf.h +++ b/gcc/config/csky/csky-linux-elf.h @@ -133,3 +133,13 @@ #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