[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86AsmPrinter.cpp
Nate Begeman
natebegeman at mac.com
Mon Jul 11 18:37:39 PDT 2005
Changes in directory llvm/lib/Target/X86:
X86ATTAsmPrinter.cpp updated: 1.3 -> 1.4
X86AsmPrinter.cpp updated: 1.142 -> 1.143
---
Log message:
Commit some pending darwin changes before subtarget support.
---
Diffs of the changes: (+13 -11)
X86ATTAsmPrinter.cpp | 3 ++-
X86AsmPrinter.cpp | 21 +++++++++++----------
2 files changed, 13 insertions(+), 11 deletions(-)
Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.3 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.4
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.3 Mon Jul 11 01:29:14 2005
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Mon Jul 11 20:37:28 2005
@@ -53,7 +53,8 @@
printMachineInstruction(II);
}
}
- O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
+ if (!forDarwin)
+ O << "\t.size " << CurrentFnName << ", .-" << CurrentFnName << "\n";
// We didn't modify anything.
return false;
Index: llvm/lib/Target/X86/X86AsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86AsmPrinter.cpp:1.142 llvm/lib/Target/X86/X86AsmPrinter.cpp:1.143
--- llvm/lib/Target/X86/X86AsmPrinter.cpp:1.142 Mon Jul 11 01:25:47 2005
+++ llvm/lib/Target/X86/X86AsmPrinter.cpp Mon Jul 11 20:37:28 2005
@@ -58,6 +58,7 @@
leadingUnderscore = false;
#endif
}
+
if (leadingUnderscore || forCygwin || forDarwin)
GlobalPrefix = "_";
@@ -159,6 +160,16 @@
}
if (forDarwin) {
+ // Output stubs for external global variables
+ if (GVStubs.begin() != GVStubs.end())
+ O << "\t.non_lazy_symbol_pointer\n";
+ for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
+ i != e; ++i) {
+ O << "L" << *i << "$non_lazy_ptr:\n";
+ O << "\t.indirect_symbol " << *i << "\n";
+ O << "\t.long\t0\n";
+ }
+
// Output stubs for dynamically-linked functions
unsigned j = 1;
for (std::set<std::string>::iterator i = FnStubs.begin(), e = FnStubs.end();
@@ -178,16 +189,6 @@
O << "\n";
- // Output stubs for external global variables
- if (GVStubs.begin() != GVStubs.end())
- O << ".data\n.non_lazy_symbol_pointer\n";
- for (std::set<std::string>::iterator i = GVStubs.begin(), e = GVStubs.end();
- i != e; ++i) {
- O << "L" << *i << "$non_lazy_ptr:\n";
- O << "\t.indirect_symbol " << *i << "\n";
- O << "\t.long\t0\n";
- }
-
// Output stubs for link-once variables
if (LinkOnceStubs.begin() != LinkOnceStubs.end())
O << ".data\n.align 2\n";
More information about the llvm-commits
mailing list