From a9ed94c129c99104b468b287ef188cf90f150e9a Mon Sep 17 00:00:00 2001 From: Kwok Cheung Yeung Date: Mon, 3 Aug 2020 17:38:13 +0200 Subject: nvptx: Add support for subword compare-and-swap This adds support for __sync_val_compare_and_swap and __sync_bool_compare_and_swap for 1-byte and 2-byte long values, which are not natively supported on nvptx. Build and reg-tested on nvptx. Build and reg-tested libgomp on x86_64 with nvptx accelerator. 2020-07-16 Kwok Cheung Yeung libgcc/ * config/nvptx/atomic.c: New. * config/nvptx/t-nvptx (LIB2ADD): Add atomic.c. gcc/testsuite/ * gcc.target/nvptx/ia64-sync-5.c: New. libgomp/ * testsuite/libgomp.c-c++-common/reduction-16.c: New. --- gcc/testsuite/gcc.target/nvptx/ia64-sync-5.c | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 gcc/testsuite/gcc.target/nvptx/ia64-sync-5.c (limited to 'gcc') diff --git a/gcc/testsuite/gcc.target/nvptx/ia64-sync-5.c b/gcc/testsuite/gcc.target/nvptx/ia64-sync-5.c new file mode 100644 index 0000000..ec40f2c --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/ia64-sync-5.c @@ -0,0 +1,2 @@ +/* { dg-do run } */ +#include "../../gcc.dg/ia64-sync-5.c" -- cgit v1.1