[nvptx] Basic -misa support for nvptx
authorCesar Philippidis <cesar@codesourcery.com>
Wed, 5 Sep 2018 22:27:31 +0000 (15:27 -0700)
committerCesar Philippidis <cesar@gcc.gnu.org>
Wed, 5 Sep 2018 22:27:31 +0000 (15:27 -0700)
commit53ceb8b542816b7b0a4175c1c2576104e1dc55ce
tree6abd01a2fd8382813052652c51a86a278a49c86e
parent62c21ceea64291317650258921c34dea79b1e96b
[nvptx] Basic -misa support for nvptx

gcc/
* config/nvptx/nvptx-opts.h: New file.
* config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
* config/nvptx/nvptx.h: Include "nvptx-opts.h".
(ASM_SPEC): Define.
(TARGET_SM35): New macro.
* config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
correct predicate.
* config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
values.
(misa=): New option.
* doc/invoke.texi (Nvidia PTX Options): Document -misa.

gcc/testsuite/
* gcc.target/nvptx/atomic_fetch-1.c: New test.
* gcc.target/nvptx/atomic_fetch-1.c: New test.

Co-Authored-By: Bernd Schmidt <bernds_cb1@t-online.de>
From-SVN: r264133
gcc/ChangeLog
gcc/config/nvptx/nvptx-opts.h [new file with mode: 0644]
gcc/config/nvptx/nvptx.c
gcc/config/nvptx/nvptx.h
gcc/config/nvptx/nvptx.md
gcc/config/nvptx/nvptx.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/nvptx/atomic-fetch-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/atomic_fetch-1.c [new file with mode: 0644]