diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-27 13:54:47 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-27 13:54:47 +0000 |
commit | c39c12a3fae1cf979ce7b39d83d394f73506dcaa (patch) | |
tree | 098c7d07bf16b9325ae9cbf74e67aaf80acf5337 /llvm/lib/Target/ARM/ARMAsmPrinter.cpp | |
parent | c9f22fd1a4341822c3a6d934ab7139ce2c427ec3 (diff) | |
download | bcm5719-llvm-c39c12a3fae1cf979ce7b39d83d394f73506dcaa.tar.gz bcm5719-llvm-c39c12a3fae1cf979ce7b39d83d394f73506dcaa.zip |
ARM TLS: implement "general dynamic", "initial exec" and "local exec" models.
llvm-svn: 36506
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/ARMAsmPrinter.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp index 6e9a9038dc4..d8733789863 100644 --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -134,10 +134,14 @@ namespace { } else O << Name; if (ACPV->hasModifier()) O << "(" << ACPV->getModifier() << ")"; - if (ACPV->getPCAdjustment() != 0) + if (ACPV->getPCAdjustment() != 0) { O << "-(" << TAI->getPrivateGlobalPrefix() << "PC" << utostr(ACPV->getLabelId()) - << "+" << (unsigned)ACPV->getPCAdjustment() << ")"; + << "+" << (unsigned)ACPV->getPCAdjustment(); + if (ACPV->mustAddCurrentAddress()) + O << "-."; + O << ")"; + } O << "\n"; // If the constant pool value is a extern weak symbol, remember to emit @@ -869,9 +873,13 @@ bool ARMAsmPrinter::doFinalization(Module &M) { SwitchToDataSection(SectionName.c_str()); } else { if (C->isNullValue() && !NoZerosInBSS && TAI->getBSSSection()) - SwitchToDataSection(TAI->getBSSSection(), I); + SwitchToDataSection(I->isThreadLocal() ? TAI->getTLSBSSSection() : + TAI->getBSSSection(), I); else if (!I->isConstant()) - SwitchToDataSection(TAI->getDataSection(), I); + SwitchToDataSection(I->isThreadLocal() ? TAI->getTLSDataSection() : + TAI->getDataSection(), I); + else if (I->isThreadLocal()) + SwitchToDataSection(TAI->getTLSDataSection()); else { // Read-only data. bool HasReloc = C->ContainsRelocations(); |