[llvm-commits] [llvm] r57010 - /llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Jim Grosbach
grosbach at apple.com
Fri Oct 3 08:52:42 PDT 2008
Author: grosbach
Date: Fri Oct 3 10:52:42 2008
New Revision: 57010
URL: http://llvm.org/viewvc/llvm-project?rev=57010&view=rev
Log:
NeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
for global relocations that do need them (libc calls, for example).
Modified:
llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp?rev=57010&r1=57009&r2=57010&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMCodeEmitter.cpp Fri Oct 3 10:52:42 2008
@@ -120,7 +120,7 @@
/// 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 @@
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 @@
/// 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
More information about the llvm-commits
mailing list