mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
convert the rest of this over to use SwitchSection
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24448 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
224cfc2eac
commit
7b6e53cde7
@ -32,7 +32,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
printConstantPool(MF.getConstantPool());
|
||||
|
||||
// Print out labels for the function.
|
||||
O << "\t.text\n";
|
||||
SwitchSection("\t.text\n", MF.getFunction());
|
||||
emitAlignment(4); // FIXME: This should be parameterized somewhere.
|
||||
O << "\t.globl\t" << CurrentFnName << "\n";
|
||||
if (!forCygwin && !forDarwin)
|
||||
|
@ -84,11 +84,7 @@ void X86SharedAsmPrinter::printConstantPool(MachineConstantPool *MCP) {
|
||||
|
||||
if (CP.empty()) return;
|
||||
|
||||
if (forDarwin) {
|
||||
O << "\t.const\n";
|
||||
} else {
|
||||
O << "\t.section .rodata\n";
|
||||
}
|
||||
SwitchSection(forDarwin ? "\t.const\n" : "\t.section .rodata\n", 0);
|
||||
|
||||
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
|
||||
// FIXME: force doubles to be naturally aligned. We should handle this
|
||||
@ -168,6 +164,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
||||
}
|
||||
|
||||
if (forDarwin) {
|
||||
SwitchSection("", 0);
|
||||
// Output stubs for external global variables
|
||||
if (GVStubs.begin() != GVStubs.end())
|
||||
O << "\t.non_lazy_symbol_pointer\n";
|
||||
|
@ -32,7 +32,7 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
printConstantPool(MF.getConstantPool());
|
||||
|
||||
// Print out labels for the function.
|
||||
O << "\t.text\n";
|
||||
SwitchSection("\t.text\n", MF.getFunction());
|
||||
emitAlignment(4);
|
||||
O << "\t.globl\t" << CurrentFnName << "\n";
|
||||
if (!forCygwin && !forDarwin)
|
||||
|
Loading…
Reference in New Issue
Block a user