diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-11-13 19:22:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-11-13 19:22:28 +0000 |
commit | 35b0bfd06dd5ce8f679a497b3fbfae43667f8727 (patch) | |
tree | 766f54d4e2e5c691000cf7d3e15b6b93eb09df28 /lib/Target/ARM/ARMCodeEmitter.cpp | |
parent | 83aad6494c1edf0220b5b53ff14d7200ec0a6b12 (diff) | |
download | external_llvm-35b0bfd06dd5ce8f679a497b3fbfae43667f8727.zip external_llvm-35b0bfd06dd5ce8f679a497b3fbfae43667f8727.tar.gz external_llvm-35b0bfd06dd5ce8f679a497b3fbfae43667f8727.tar.bz2 |
Don't forget to emit stubs for function GV's emitted in CONSTPOOL_ENTRY's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59258 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMCodeEmitter.cpp')
-rw-r--r-- | lib/Target/ARM/ARMCodeEmitter.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMCodeEmitter.cpp b/lib/Target/ARM/ARMCodeEmitter.cpp index 26b2b82..4bbf301 100644 --- a/lib/Target/ARM/ARMCodeEmitter.cpp +++ b/lib/Target/ARM/ARMCodeEmitter.cpp @@ -388,7 +388,7 @@ void ARMCodeEmitter::emitConstPoolInstruction(const MachineInstr &MI) { (intptr_t)ACPV, false)); else emitGlobalAddress(GV, ARM::reloc_arm_machine_cp_entry, - ACPV->isStub(), (intptr_t)ACPV); + ACPV->isStub() || 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); @@ -397,11 +397,18 @@ void ARMCodeEmitter::emitConstPoolInstruction(const MachineInstr &MI) { } else { Constant *CV = MCPE.Val.ConstVal; +#ifndef NDEBUG DOUT << " ** Constant pool #" << CPI << " @ " - << (void*)MCE.getCurrentPCValue() << " " << *CV << '\n'; + << (void*)MCE.getCurrentPCValue() << " "; + if (const Function *F = dyn_cast<Function>(CV)) + DOUT << F->getName(); + else + DOUT << *CV; + DOUT << '\n'; +#endif if (GlobalValue *GV = dyn_cast<GlobalValue>(CV)) { - emitGlobalAddress(GV, ARM::reloc_arm_absolute, false); + emitGlobalAddress(GV, ARM::reloc_arm_absolute, isa<Function>(GV)); emitWordLE(0); } else if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) { uint32_t Val = *(uint32_t*)CI->getValue().getRawData(); |