]> git.ipfire.org Git - thirdparty/gcc.git/commit
nvptx: Expose '-mptx=4.2'
authorThomas Schwinge <tschwinge@baylibre.com>
Sun, 10 Nov 2024 16:35:07 +0000 (17:35 +0100)
committerThomas Schwinge <tschwinge@baylibre.com>
Fri, 6 Dec 2024 11:11:44 +0000 (12:11 +0100)
commit1af83aa09979e5f2ca36f844d56ccd629268057d
treef30dd3bc8726b06b2795014dc257c39aa68391b6
parent380ceb23b130a2b9ec541607a3eb1ffd0387c576
nvptx: Expose '-mptx=4.2'

'PTX_VERSION_4_2' was added in commit decde11183bdccc46587d6614b75f3d56a2f2e4a
"[nvptx] Choose -mptx default based on -misa" for use for '-march=sm_52'
('first_ptx_version_supporting_sm', 'PTX_ISA_SM53'), as documented by Nvidia.
However, '-mptx=4.2' wasn't exposed to the user, but there's no reason not to.

gcc/
* config/nvptx/nvptx.h (TARGET_PTX_4_2): New.
* config/nvptx/nvptx.opt (Enum(ptx_version)): Add 'EnumValue'
'4.2' for 'PTX_VERSION_4_2'.
* doc/invoke.texi (Nvidia PTX Options): Document '-mptx=4.2'.
gcc/testsuite/
* gcc.target/nvptx/mptx=4.2.c: New.
gcc/config/nvptx/nvptx.h
gcc/config/nvptx/nvptx.opt
gcc/doc/invoke.texi
gcc/testsuite/gcc.target/nvptx/mptx=4.2.c [new file with mode: 0644]