-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Support] Handle SPARC in sys::getHostCPUName
While working on D118450 <https://reviews.llvm.org/D118450>, I noticed that `sys::getHostCPUName` lacks SPARC support. This patch implements it. The code is taken from/inspired by GCC's `gcc/config/sparc/driver-sparc.cc`. There's one caveat: since LLVM, unlike GCC, doesn't support the SPARC-M7, -S7, and -M8 CPUs, I map all those to the latest supported one (UltraSparc T4/`niagara4`). Tested on `sparcv9-sun-solaris2.11` and `sparc64-unknown-linux-gnu` by running `savcov --version` on - Netra SPARC S7-2 (SPARC-S7, Solaris 11.4) - SPARC T5-2 (SPARC T5, Solaris 11.4) - SPARC Enterprise T5220 (UltraSPARC T2, Solaris 11.3) - SPARC T5 (UltraSPARC T5, Debian sid) - SPARC T3 (UltraSPARC T3, Debian sid) - SPARC Enterprise T5220 (Debian sid) Differential Revision: https://reviews.llvm.org/D130272
- Loading branch information
Showing
3 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters