diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-22 00:04:12 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-22 00:04:12 +0000 |
commit | 0ae4a3357a556261f25b1584a2d9914637c69e65 (patch) | |
tree | 50dc3483a2a5d6535fd82ad1f354d5df756395e5 /lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | 88894b6c40cf2d94a1c9ab8435cf6ed6c622692a (diff) |
Implement PIC for arm-linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36324 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | lib/Target/ARM/ARMAsmPrinter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp index 109ae215ad..625dd9d885 100644 --- a/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/ARMAsmPrinter.cpp @@ -133,6 +133,7 @@ namespace { O << TAI->getPrivateGlobalPrefix() << Name << "$stub"; } else O << Name; + if (ACPV->hasModifier()) O << "(" << ACPV->getModifier() << ")"; if (ACPV->getPCAdjustment() != 0) O << "-(" << TAI->getPrivateGlobalPrefix() << "PC" << utostr(ACPV->getLabelId()) @@ -284,7 +285,9 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum, FnStubs.insert(Name); } else O << Name; - + if (isCallOp && Subtarget->isTargetELF() && + TM.getRelocationModel() == Reloc::PIC_) + O << "(PLT)"; if (GV->hasExternalWeakLinkage()) ExtWeakSymbols.insert(GV); break; @@ -299,6 +302,9 @@ void ARMAsmPrinter::printOperand(const MachineInstr *MI, int opNum, FnStubs.insert(Name); } else O << Name; + if (isCallOp && Subtarget->isTargetELF() && + TM.getRelocationModel() == Reloc::PIC_) + O << "(PLT)"; break; } case MachineOperand::MO_ConstantPoolIndex: |