This allows us to get get rid of a hack in XCoreTargetObjectFile where the
the DataRel* sections were overridden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181116
91177308-0d34-0410-b5e6-
96231b3b80d8
CodeModel::Model CM,
CodeGenOpt::Level OL) {
MCCodeGenInfo *X = new MCCodeGenInfo();
+ if (RM == Reloc::Default) {
+ RM = Reloc::Static;
+ }
X->InitMCCodeGenInfo(RM, CM, OL);
return X;
}
}
}
+bool XCoreTargetLowering::
+isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
+ // The XCore target isn't yet aware of offsets.
+ return false;
+}
+
//===----------------------------------------------------------------------===//
// XCore Inline Assembly Support
//===----------------------------------------------------------------------===//
virtual bool isLegalAddressingMode(const AddrMode &AM,
Type *Ty) const;
+ virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
+
private:
const XCoreTargetMachine &TM;
const XCoreSubtarget &Subtarget;
ELF::SHF_ALLOC |
ELF::XCORE_SHF_CP_SECTION,
SectionKind::getReadOnlyWithRel());
-
- // Dynamic linking is not supported. Data with relocations is placed in the
- // same section as data without relocations.
- DataRelSection = DataRelLocalSection = DataSection;
- DataRelROSection = DataRelROLocalSection = ReadOnlySection;
}