aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-06-29 23:40:57 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-06-29 23:40:57 +0000
commit61297ee1185fd267471a1cb1fa28c585b51c5e08 (patch)
treebb99633e885f28a4255c2462ca4daedfb546e364 /lib/Target/PowerPC
parent7b00096e33f7bbe7a0b3b08f600404feb7dd42e9 (diff)
* Stop using BBNumbering, we don't really need it
* Only increment labelNumber once, because it's used by both Load{hi,lo}Addr * There is no .bss section on PowerPC * Use .align 2 instead of other random numbers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r--lib/Target/PowerPC/PPC32AsmPrinter.cpp12
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp12
-rw-r--r--lib/Target/PowerPC/PowerPCAsmPrinter.cpp12
3 files changed, 6 insertions, 30 deletions
diff --git a/lib/Target/PowerPC/PPC32AsmPrinter.cpp b/lib/Target/PowerPC/PPC32AsmPrinter.cpp
index 83b02fc39e..0d519eeab0 100644
--- a/lib/Target/PowerPC/PPC32AsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPC32AsmPrinter.cpp
@@ -369,10 +369,6 @@ void Printer::printConstantPool(MachineConstantPool *MCP) {
/// method to print assembly for each instruction.
///
bool Printer::runOnMachineFunction(MachineFunction &MF) {
- // BBNumber is used here so that a given Printer will never give two
- // BBs the same name. (If you have a better way, please let me know!)
- static unsigned BBNumber = 0;
-
O << "\n\n";
// What's my mangled name?
CurrentFnName = Mang->getValueName(MF.getFunction());
@@ -383,7 +379,7 @@ bool Printer::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function.
O << "\t.text\n";
O << "\t.globl\t" << CurrentFnName << "\n";
- O << "\t.align 5\n";
+ O << "\t.align 2\n";
O << CurrentFnName << ":\n";
// Print out code for the function.
@@ -523,7 +519,6 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
O << "\"L0000" << labelNumber << "$pb\":\n";
O << "\tmflr ";
printOp(MI->getOperand(0));
- labelNumber++;
O << "\n";
return;
}
@@ -641,10 +636,7 @@ bool Printer::doFinalization(Module &M) {
O << "\t.globl " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- if (C->isNullValue())
- SwitchSection(O, CurSection, ".bss");
- else
- SwitchSection(O, CurSection, ".data");
+ SwitchSection(O, CurSection, ".data");
break;
}
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 83b02fc39e..0d519eeab0 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -369,10 +369,6 @@ void Printer::printConstantPool(MachineConstantPool *MCP) {
/// method to print assembly for each instruction.
///
bool Printer::runOnMachineFunction(MachineFunction &MF) {
- // BBNumber is used here so that a given Printer will never give two
- // BBs the same name. (If you have a better way, please let me know!)
- static unsigned BBNumber = 0;
-
O << "\n\n";
// What's my mangled name?
CurrentFnName = Mang->getValueName(MF.getFunction());
@@ -383,7 +379,7 @@ bool Printer::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function.
O << "\t.text\n";
O << "\t.globl\t" << CurrentFnName << "\n";
- O << "\t.align 5\n";
+ O << "\t.align 2\n";
O << CurrentFnName << ":\n";
// Print out code for the function.
@@ -523,7 +519,6 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
O << "\"L0000" << labelNumber << "$pb\":\n";
O << "\tmflr ";
printOp(MI->getOperand(0));
- labelNumber++;
O << "\n";
return;
}
@@ -641,10 +636,7 @@ bool Printer::doFinalization(Module &M) {
O << "\t.globl " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- if (C->isNullValue())
- SwitchSection(O, CurSection, ".bss");
- else
- SwitchSection(O, CurSection, ".data");
+ SwitchSection(O, CurSection, ".data");
break;
}
diff --git a/lib/Target/PowerPC/PowerPCAsmPrinter.cpp b/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
index 83b02fc39e..0d519eeab0 100644
--- a/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
@@ -369,10 +369,6 @@ void Printer::printConstantPool(MachineConstantPool *MCP) {
/// method to print assembly for each instruction.
///
bool Printer::runOnMachineFunction(MachineFunction &MF) {
- // BBNumber is used here so that a given Printer will never give two
- // BBs the same name. (If you have a better way, please let me know!)
- static unsigned BBNumber = 0;
-
O << "\n\n";
// What's my mangled name?
CurrentFnName = Mang->getValueName(MF.getFunction());
@@ -383,7 +379,7 @@ bool Printer::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function.
O << "\t.text\n";
O << "\t.globl\t" << CurrentFnName << "\n";
- O << "\t.align 5\n";
+ O << "\t.align 2\n";
O << CurrentFnName << ":\n";
// Print out code for the function.
@@ -523,7 +519,6 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
O << "\"L0000" << labelNumber << "$pb\":\n";
O << "\tmflr ";
printOp(MI->getOperand(0));
- labelNumber++;
O << "\n";
return;
}
@@ -641,10 +636,7 @@ bool Printer::doFinalization(Module &M) {
O << "\t.globl " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- if (C->isNullValue())
- SwitchSection(O, CurSection, ".bss");
- else
- SwitchSection(O, CurSection, ".data");
+ SwitchSection(O, CurSection, ".data");
break;
}