mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Functions that are lazily streamed in from the .bc file are *not* external.
This fixes llvm-test/SingleSource/UnitTests/2006-01-29-SimpleIndirectCall.c and PR704 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25793 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7859313bae
commit
37dd6f1b79
@ -196,7 +196,8 @@ int PPCCodeEmitter::getMachineOpValue(MachineInstr &MI, MachineOperand &MO) {
|
||||
bool isExternal = MO.isExternalSymbol() ||
|
||||
MO.getGlobal()->hasWeakLinkage() ||
|
||||
MO.getGlobal()->hasLinkOnceLinkage() ||
|
||||
MO.getGlobal()->isExternal();
|
||||
(MO.getGlobal()->isExternal() &&
|
||||
!MO.getGlobal()->hasNotBeenReadFromBytecode());
|
||||
unsigned Reloc = 0;
|
||||
if (MI.getOpcode() == PPC::BL)
|
||||
Reloc = PPC::reloc_pcrel_bx;
|
||||
|
@ -437,7 +437,8 @@ SDOperand PPCTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||
SDOperand Lo = DAG.getNode(PPCISD::Lo, MVT::i32, GA, Zero);
|
||||
Lo = DAG.getNode(ISD::ADD, MVT::i32, Hi, Lo);
|
||||
|
||||
if (!GV->hasWeakLinkage() && !GV->hasLinkOnceLinkage() && !GV->isExternal())
|
||||
if (!GV->hasWeakLinkage() && !GV->hasLinkOnceLinkage() &&
|
||||
(!GV->isExternal() || GV->hasNotBeenReadFromBytecode()))
|
||||
return Lo;
|
||||
|
||||
// If the global is weak or external, we have to go through the lazy
|
||||
|
Loading…
Reference in New Issue
Block a user