llvm.org GIT mirror llvm / 016d34c
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 Jim Grosbach 11 years ago
1 changed file(s) with 4 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
119119 /// Routines that handle operands which add machine relocations which are
120120 /// fixed up by the JIT fixup stage.
121121 void emitGlobalAddress(GlobalValue *GV, unsigned Reloc,
122 bool DoesntNeedStub);
122 bool NeedStub);
123123 void emitExternalSymbolAddress(const char *ES, unsigned Reloc);
124124 void emitConstPoolAddress(unsigned CPI, unsigned Reloc,
125125 int Disp = 0, unsigned PCAdj = 0 );
185185 else if (MO.isImm())
186186 return static_cast(MO.getImm());
187187 else if (MO.isGlobal())
188 emitGlobalAddress(MO.getGlobal(), ARM::reloc_arm_branch, false);
188 emitGlobalAddress(MO.getGlobal(), ARM::reloc_arm_branch, true);
189189 else if (MO.isSymbol())
190190 emitExternalSymbolAddress(MO.getSymbolName(), ARM::reloc_arm_relative);
191191 else if (MO.isCPI())
204204 /// emitGlobalAddress - Emit the specified address to the code stream.
205205 ///
206206 void ARMCodeEmitter::emitGlobalAddress(GlobalValue *GV,
207 unsigned Reloc, bool DoesntNeedStub) {
207 unsigned Reloc, bool NeedStub) {
208208 MCE.addRelocation(MachineRelocation::getGV(MCE.getCurrentPCOffset(),
209 Reloc, GV, 0, DoesntNeedStub));
209 Reloc, GV, 0, NeedStub));
210210 }
211211
212212 /// emitExternalSymbolAddress - Arrange for the address of an external symbol to