[PATCH] D86621: [clang][Sparc] Default to -mcpu=v9 for SparcV8 on Solaris
Rainer Orth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 13:51:01 PDT 2020
ro added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:350
return A->getValue();
+ if (T.getArch() == llvm::Triple::sparc && T.isOSSolaris())
+ return "v9";
----------------
brad wrote:
> ro wrote:
> > efriedma wrote:
> > > Do we want to make sparc and sparcel behave differently here?
> > The only thing about little-endian SPARC is that UltraSPARC CPUs can be run in little-endian mode, presumably to ease a Windows NT port that never materialized.
> >
> > I could barely find any info on sparcel: the triplet isn't in `config.guess`, there's very little else about such CPUs and certainly no specification or even an ABI. That's why I tend to leave sparcel-specific code alone unless someone who knows these beasts tells me otherwise.
> >
> > What I can say for certain that Solaris never ran on little-endian SPARC.
> "The Sparcle is an experimental 32-bit microprocessor chip developed in 1992 by a consortium of MIT, LSI Corporation, and Sun Microsystems. It was an evolution Sun's SPARC RISC architecture with features geared towards "large-scale multiprocessing".[1] The chip was manufactured by LSI."
>
> https://people.eecs.berkeley.edu/~kubitron/cs252/handouts/papers/sparcle-micro-final.pdf
>
> From what little I can find I believe this prototype CPU / system was based on Linux.
Ah, thanks. So this predates Solaris 2.0 (also released in 1992). But even if not, current Solaris 11 is SPARC V9-only.
However, if this is the only implementation, this bears the question why support for such an experimental CPU almost 30 years old still lives in LLVM. It comes with a cost, if only for reasoning what needs and needs not to be done to the V8el code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86621/new/
https://reviews.llvm.org/D86621
More information about the cfe-commits
mailing list