mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
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
This commit is contained in:
parent
83aad6494c
commit
35b0bfd06d
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user