Clang doesn't recognize "-mvis3b" or "-mvis4" command-line options for SPARC64
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Clang version: 23.0.0
Full command-line: `clang -S --target=sparc64-linux-gnu -mvis4 -O3 vis-test.c`
```
clang: error: unknown argument '-mvis4'; did you mean '-mvis2'?
```
Full command-line: `clang -S --target=sparc64-linux-gnu -mcpu=niagara4 -mvis3 -O3 vis-test.c`
```
vis-test.c:1:10: fatal error: 'visintrin.h' file not found
1 | #include
| ^~~~~~~~~~~~~
1 error generated.
```
Full command-line: `clang -S --target=sparc64-linux-gnu -mcpu=niagara4 -mvis3b -O3 vis-test.c`
```
clang: error: unknown argument '-mvis3b'; did you mean '-mvis3'?
```
Using `-mcpu=niagara7` or `-mcpu=m8` also fails.
GCC does support:
* `-mvis3` to enable Visual Instruction Set version 3.0 (Niagara 3, preprocessor `__VIS = 0x300` and `__VIS__ = 0x300`).
* `-mvis3b` to enable Visual Instruction Set version 3.0 + Oracle SPARC Architecture 2011 (Niagara 7, preprocessor `__VIS = 0x310` and `__VIS__ = 0x310`).
* `-mvis4` to enable Visual Instruction Set version 4.0 (Niagara 7, preprocessor `__VIS = 0x400` and `__VIS__ = 0x400`).
* `-mvis4b` to enable Visual Instruction Set version 4.0 + Oracle SPARC Architecture 2017 (m8, preprocessor `__VIS = 0x410` and `__VIS__ = 0x410`).
GCC documentation lists some of the Oracle SPARC Architecture 2011 instructions belonging to VIS 4.0, but Oracle SPARC Architecture 2011 added following instructions for VIS 3.0B: (see https://www.oracle.com/technetwork/server-storage/sun-sparc-enterprise/documentation/140521-ua2011-d096-p-ext-2306580.pdf)
```
FPADD64
FPSUB64
FPCMPUEQ8
FPCMPUNE8
FPCMPULE8
FPCMPUGT8
LDXEFSR
MOVsTOsw
MOVsTOuw
MOVdTOx
MOVwTOs
MOVxTOd
```
Contributor guide
Assessment
This issue has not been assessed yet.