aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Sparc
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-09 04:59:56 +0000
committerChris Lattner <sabre@nondot.org>2006-05-09 04:59:56 +0000
commit4632d7a57008564c4b0f8246e85bd813a200d2c6 (patch)
tree8b69e32644052f6eb34fe57fd56e1024a5f56f77 /lib/Target/Sparc
parentf668ffc4c2cf3da8ef0948b316d971c4b41b0e05 (diff)
Split SwitchSection into SwitchTo{Text|Data}Section methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc')
-rw-r--r--lib/Target/Sparc/SparcAsmPrinter.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp
index 47ed6fcda7..da2a31e20d 100644
--- a/lib/Target/Sparc/SparcAsmPrinter.cpp
+++ b/lib/Target/Sparc/SparcAsmPrinter.cpp
@@ -98,8 +98,8 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
CurrentFnName = Mang->getValueName(MF.getFunction());
// Print out labels for the function.
- O << "\t.text\n";
- O << "\t.align 16\n";
+ SwitchToTextSection(".text", MF.getFunction());
+ EmitAlignment(4, MF.getFunction());
O << "\t.globl\t" << CurrentFnName << "\n";
O << "\t.type\t" << CurrentFnName << ", #function\n";
O << CurrentFnName << ":\n";
@@ -238,7 +238,7 @@ bool SparcAsmPrinter::doFinalization(Module &M) {
if (C->isNullValue() &&
(I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
I->hasWeakLinkage() /* FIXME: Verify correct */)) {
- SwitchSection(".data", I);
+ SwitchToDataSection(".data", I);
if (I->hasInternalLinkage())
O << "\t.local " << name << "\n";
@@ -253,7 +253,7 @@ bool SparcAsmPrinter::doFinalization(Module &M) {
case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak.
// Nonnull linkonce -> weak
O << "\t.weak " << name << "\n";
- SwitchSection("", I);
+ SwitchToDataSection("", I);
O << "\t.section\t\".llvm.linkonce.d." << name
<< "\",\"aw\",@progbits\n";
break;
@@ -267,9 +267,9 @@ bool SparcAsmPrinter::doFinalization(Module &M) {
// FALL THROUGH
case GlobalValue::InternalLinkage:
if (C->isNullValue())
- SwitchSection(".bss", I);
+ SwitchToDataSection(".bss", I);
else
- SwitchSection(".data", I);
+ SwitchToDataSection(".data", I);
break;
case GlobalValue::GhostLinkage:
std::cerr << "Should not have any unmaterialized functions!\n";