[llvm] [SPARC][IAS] Emit the correct 32-bit ELF machine type (PR #96583)
John Paul Adrian Glaubitz via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 02:04:02 PDT 2024
================
@@ -132,14 +132,18 @@ namespace {
class SparcAsmBackend : public MCAsmBackend {
protected:
const Target &TheTarget;
+ const MCSubtargetInfo &TheSTI;
bool Is64Bit;
+ bool HasV9;
public:
- SparcAsmBackend(const Target &T)
+ SparcAsmBackend(const Target &T, const MCSubtargetInfo &STI)
: MCAsmBackend(StringRef(T.getName()) == "sparcel"
? llvm::endianness::little
: llvm::endianness::big),
- TheTarget(T), Is64Bit(StringRef(TheTarget.getName()) == "sparcv9") {}
+ TheTarget(T), TheSTI(STI),
+ Is64Bit(StringRef(TheTarget.getName()) == "sparcv9"),
----------------
glaubitz wrote:
Unrelated to your change, but I wonder whether checking for the target name being `sparcv9` is the proper and robust way to check whether we're on 64-bit SPARC. On Linux, the 64-bit SPARC target is called `sparc64` and not `sparcv9`.
https://github.com/llvm/llvm-project/pull/96583
More information about the llvm-commits
mailing list