mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
For mips64 switch statements in subroutines could generate
within the codegen EK_GPRel64BlockAddress. This was not supported for direct object output and resulted in an assertion. This change adds support for EK_GPRel64BlockAddress for direct object. One fallout from this is to turn on rela relocations for mips64 to match gas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162334 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -258,12 +258,18 @@ bool MCObjectStreamer::EmitValueToOffset(const MCExpr *Offset,
|
||||
void MCObjectStreamer::EmitGPRel32Value(const MCExpr *Value) {
|
||||
MCDataFragment *DF = getOrCreateDataFragment();
|
||||
|
||||
DF->addFixup(MCFixup::Create(DF->getContents().size(),
|
||||
Value,
|
||||
FK_GPRel_4));
|
||||
DF->addFixup(MCFixup::Create(DF->getContents().size(), Value, FK_GPRel_4));
|
||||
DF->getContents().resize(DF->getContents().size() + 4, 0);
|
||||
}
|
||||
|
||||
// Associate GPRel32 fixup with data and resize data area
|
||||
void MCObjectStreamer::EmitGPRel64Value(const MCExpr *Value) {
|
||||
MCDataFragment *DF = getOrCreateDataFragment();
|
||||
|
||||
DF->addFixup(MCFixup::Create(DF->getContents().size(), Value, FK_GPRel_4));
|
||||
DF->getContents().resize(DF->getContents().size() + 8, 0);
|
||||
}
|
||||
|
||||
void MCObjectStreamer::FinishImpl() {
|
||||
// Dump out the dwarf file & directory tables and line tables.
|
||||
const MCSymbol *LineSectionSymbol = NULL;
|
||||
|
Reference in New Issue
Block a user