diff options
author | Jim Grosbach <grosbach@apple.com> | 2008-10-03 15:52:42 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2008-10-03 15:52:42 +0000 |
commit | 016d34cc4caa5eac50378c652a5301fb1fbd48b3 (patch) | |
tree | ff970c03112090af45cf0ce14592a979d2ba9751 | |
parent | 191dfb96ded746bc38586e36a61509b5bb9b00da (diff) |
NeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
for global relocations that do need them (libc calls, for example).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57010 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMCodeEmitter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/ARM/ARMCodeEmitter.cpp b/lib/Target/ARM/ARMCodeEmitter.cpp index 108624275c..3936afc717 100644 --- a/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/lib/Target/ARM/ARMCodeEmitter.cpp @@ -120,7 +120,7 @@ namespace { /// Routines that handle operands which add machine relocations which are /// fixed up by the JIT fixup stage. void emitGlobalAddress(GlobalValue *GV, unsigned Reloc, - bool DoesntNeedStub); + bool NeedStub); void emitExternalSymbolAddress(const char *ES, unsigned Reloc); void emitConstPoolAddress(unsigned CPI, unsigned Reloc, int Disp = 0, unsigned PCAdj = 0 ); @@ -186,7 +186,7 @@ unsigned ARMCodeEmitter::getMachineOpValue(const MachineInstr &MI, else if (MO.isImm()) return static_cast<unsigned>(MO.getImm()); else if (MO.isGlobal()) - emitGlobalAddress(MO.getGlobal(), ARM::reloc_arm_branch, false); + emitGlobalAddress(MO.getGlobal(), ARM::reloc_arm_branch, true); else if (MO.isSymbol()) emitExternalSymbolAddress(MO.getSymbolName(), ARM::reloc_arm_relative); else if (MO.isCPI()) @@ -205,9 +205,9 @@ unsigned ARMCodeEmitter::getMachineOpValue(const MachineInstr &MI, /// emitGlobalAddress - Emit the specified address to the code stream. /// void ARMCodeEmitter::emitGlobalAddress(GlobalValue *GV, - unsigned Reloc, bool DoesntNeedStub) { + unsigned Reloc, bool NeedStub) { MCE.addRelocation(MachineRelocation::getGV(MCE.getCurrentPCOffset(), - Reloc, GV, 0, DoesntNeedStub)); + Reloc, GV, 0, NeedStub)); } /// emitExternalSymbolAddress - Arrange for the address of an external symbol to |