mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
A TAI hook is appropriate in this case because this is just an asm syntax issue, not a semantic difference. TLOF should model the semantics of the section. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78498 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -549,34 +549,8 @@ static SPCC::CondCodes FPCondCCodeToFCC(ISD::CondCode CC) {
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
class TargetLoweringObjectFileSparc : public TargetLoweringObjectFileELF {
|
||||
public:
|
||||
void getSectionFlagsAsString(SectionKind Kind,
|
||||
SmallVectorImpl<char> &Str) const {
|
||||
if (Kind.isMergeableConst() || Kind.isMergeableCString())
|
||||
return TargetLoweringObjectFileELF::getSectionFlagsAsString(Kind, Str);
|
||||
|
||||
// FIXME: Inefficient.
|
||||
std::string Res;
|
||||
if (!Kind.isMetadata())
|
||||
Res += ",#alloc";
|
||||
if (Kind.isText())
|
||||
Res += ",#execinstr";
|
||||
if (Kind.isWriteable())
|
||||
Res += ",#write";
|
||||
if (Kind.isThreadLocal())
|
||||
Res += ",#tls";
|
||||
|
||||
Str.append(Res.begin(), Res.end());
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
SparcTargetLowering::SparcTargetLowering(TargetMachine &TM)
|
||||
: TargetLowering(TM, new TargetLoweringObjectFileSparc()) {
|
||||
: TargetLowering(TM, new TargetLoweringObjectFileELF()) {
|
||||
|
||||
// Set up the register classes.
|
||||
addRegisterClass(MVT::i32, SP::IntRegsRegisterClass);
|
||||
|
Reference in New Issue
Block a user