Go to file
Tom de Vries e0451f93d9 [nvptx] Add some support for .local atomics
The ptx insn atom doesn't support local memory.  In case of doing an atomic
operation on local memory, we run into:
...
operation not supported on global/shared address space
...
This is the cuGetErrorString message for CUDA_ERROR_INVALID_ADDRESS_SPACE.

The message is somewhat confusing given that actually the operation is not
supported on local address space.

Fix this by falling back on a non-atomic version when detecting
a frame-related memory operand.

This only solves some cases that are detected at compile-time.  It does
however fix the openacc private-atomic-* test-cases.

Tested on x86_64 with nvptx accelerator.

gcc/ChangeLog:

2022-01-27  Tom de Vries  <tdevries@suse.de>

	* config/nvptx/nvptx.md (define_insn "atomic_compare_and_swap<mode>_1")
	(define_insn "atomic_exchange<mode>")
	(define_insn "atomic_fetch_add<mode>")
	(define_insn "atomic_fetch_addsf")
	(define_insn "atomic_fetch_<logic><mode>"): Output non-atomic version
	if memory operands is frame-relative.

gcc/testsuite/ChangeLog:

2022-01-31  Tom de Vries  <tdevries@suse.de>

	* gcc.target/nvptx/stack-atomics-run.c: New test.

libgomp/ChangeLog:

2022-01-27  Tom de Vries  <tdevries@suse.de>

	* testsuite/libgomp.oacc-c-c++-common/private-atomic-1.c: Remove
	PR83812 workaround.
	* testsuite/libgomp.oacc-fortran/private-atomic-1-vector.f90: Same.
	* testsuite/libgomp.oacc-fortran/private-atomic-1-worker.f90: Same.
2022-02-01 19:28:24 +01:00
INSTALL
c++tools
config
contrib Daily bump. 2022-02-01 00:16:29 +00:00
fixincludes Fix glitch in entry for vxworks_posix_open 2022-01-17 13:23:40 +00:00
gcc [nvptx] Add some support for .local atomics 2022-02-01 19:28:24 +01:00
gnattools
gotools
include
intl
libada
libatomic Daily bump. 2022-02-01 00:16:29 +00:00
libbacktrace
libcc1
libcody
libcpp Daily bump. 2022-01-25 00:16:27 +00:00
libdecnumber
libffi
libgcc Daily bump. 2022-01-26 00:16:38 +00:00
libgfortran Daily bump. 2022-01-27 00:16:29 +00:00
libgo runtime: build panic32.go on amd64p32 2022-01-20 19:06:50 -08:00
libgomp [nvptx] Add some support for .local atomics 2022-02-01 19:28:24 +01:00
libiberty Daily bump. 2022-02-01 00:16:29 +00:00
libitm Daily bump. 2022-02-01 00:16:29 +00:00
libobjc
liboffloadmic
libphobos Daily bump. 2022-01-04 00:16:40 +00:00
libquadmath Daily bump. 2022-01-12 00:16:39 +00:00
libsanitizer
libssp
libstdc++-v3 Strengthen memory order for atomic<T>::wait/notify 2022-02-01 09:04:10 -08:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Daily bump. 2022-02-01 00:16:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Update my email and add myself to the DCO list. 2022-01-31 18:05:40 -05:00
Makefile.def Revert "Fix PR 67102: Add libstdc++ dependancy to libffi" [PR67102] 2022-01-25 18:46:21 +01:00
Makefile.in Revert "Fix PR 67102: Add libstdc++ dependancy to libffi" [PR67102] 2022-01-25 18:46:21 +01:00
Makefile.tpl
README
ar-lib
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
symlink-tree
test-driver
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.