aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKwok Cheung Yeung <kcy@codesourcery.com>2020-08-03 17:38:13 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 15:08:09 -0300
commita9ed94c129c99104b468b287ef188cf90f150e9a (patch)
tree51ea7e06705750741e8aeacaac47c050dea0eec5 /gcc
parente38baba9bbeed73bddba2e7f448e03d5fae0d296 (diff)
downloadgcc-a9ed94c129c99104b468b287ef188cf90f150e9a.zip
gcc-a9ed94c129c99104b468b287ef188cf90f150e9a.tar.gz
gcc-a9ed94c129c99104b468b287ef188cf90f150e9a.tar.bz2
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 <kcy@codesourcery.com> 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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/nvptx/ia64-sync-5.c2
1 files changed, 2 insertions, 0 deletions
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"