mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-02 21:17:17 +00:00
Let Darwin linker auto-synthesize stubs and lazy-pointers. This deletes a bunch of nasty code in ARM asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80404 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -417,16 +417,9 @@ void Emitter<CodeEmitter>::emitConstPoolInstruction(const MachineInstr &MI) {
|
||||
|
||||
GlobalValue *GV = ACPV->getGV();
|
||||
if (GV) {
|
||||
assert(!ACPV->isStub() && "Don't know how to deal this yet!");
|
||||
if (ACPV->isNonLazyPointer())
|
||||
MCE.addRelocation(MachineRelocation::getIndirectSymbol(
|
||||
MCE.getCurrentPCOffset(), ARM::reloc_arm_machine_cp_entry, GV,
|
||||
(intptr_t)ACPV, false));
|
||||
else
|
||||
emitGlobalAddress(GV, ARM::reloc_arm_machine_cp_entry,
|
||||
ACPV->isStub() || isa<Function>(GV), (intptr_t)ACPV);
|
||||
emitGlobalAddress(GV, ARM::reloc_arm_machine_cp_entry,
|
||||
isa<Function>(GV), (intptr_t)ACPV);
|
||||
} else {
|
||||
assert(!ACPV->isNonLazyPointer() && "Don't know how to deal this yet!");
|
||||
emitExternalSymbolAddress(ACPV->getSymbol(), ARM::reloc_arm_absolute);
|
||||
}
|
||||
emitWordLE(0);
|
||||
|
Reference in New Issue
Block a user