[nvptx] Add march alias for misa
authorTom de Vries <tdevries@suse.de>
Tue, 29 Mar 2022 08:31:51 +0000 (10:31 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 29 Mar 2022 10:55:35 +0000 (12:55 +0200)
commitc5db32a143604f44672cfe312ffc6edfd5c86a4a
treec9c3bb84b6a465d45ecae18cdd446a559ea11691
parent06ff470638c6c632a6b5b0000b0db0f01bbb9cbc
[nvptx] Add march alias for misa

The target option misa has the following description:
...
$ gcc --target-help 2>&1 | grep misa
  -misa=                      Specify the PTX ISA target architecture to use.
...

The name misa is somewhat poorly chosen.  It suggests that for a use
-misa=sm_30, sm_30 is the name of a specific Instruction Set Architecture.
Instead, sm_30 is the name of a specific target architecture in the generic
PTX Instruction Set Architecture.

Futhermore, there's mptx, which also has ISA in the description:
...
  -mptx=                      Specify the PTX ISA version to use.
...

Add the more intuitive alias march for misa:
...
$ gcc --target-help 2>&1 | grep march
  -march=                     Alias:  Same as -misa=.
...

Tested on nvptx.

gcc/ChangeLog:

2022-03-29  Tom de Vries  <tdevries@suse.de>

* config/nvptx/nvptx.opt (march): Add alias of misa.

gcc/testsuite/ChangeLog:

2022-03-29  Tom de Vries  <tdevries@suse.de>

* gcc.target/nvptx/main.c: New test.
* gcc.target/nvptx/march.c: New test.
gcc/config/nvptx/nvptx.opt
gcc/testsuite/gcc.target/nvptx/main.c [new file with mode: 0644]
gcc/testsuite/gcc.target/nvptx/march.c [new file with mode: 0644]