[llvm-commits] [llvm] r40501 - /llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jul 25 16:36:05 PDT 2007
Author: evancheng
Date: Wed Jul 25 18:36:05 2007
New Revision: 40501
URL: http://llvm.org/viewvc/llvm-project?rev=40501&view=rev
Log:
Mac OS X should use 0x90 to fill in gaps to satisfy function alignment requirements.
Modified:
llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=40501&r1=40500&r2=40501&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 25 18:36:05 2007
@@ -99,19 +99,28 @@
switch (F->getLinkage()) {
default: assert(0 && "Unknown linkage type!");
case Function::InternalLinkage: // Symbols default to internal.
- EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
+ if (Subtarget->isTargetDarwin())
+ // FIXME: This should be parameterized somewhere.
+ EmitAlignment(4, F, 0, true, 0x90);
+ else
+ EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
break;
case Function::DLLExportLinkage:
DLLExportedFns.insert(Mang->makeNameProper(F->getName(), ""));
//FALLS THROUGH
case Function::ExternalLinkage:
- EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
+ if (Subtarget->isTargetDarwin())
+ // FIXME: This should be parameterized somewhere.
+ EmitAlignment(4, F, 0, true, 0x90);
+ else
+ EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
O << "\t.globl\t" << CurrentFnName << "\n";
break;
case Function::LinkOnceLinkage:
case Function::WeakLinkage:
if (Subtarget->isTargetDarwin()) {
- EmitAlignment(4, F); // FIXME: This should be parameterized somewhere.
+ // FIXME: This should be parameterized somewhere.
+ EmitAlignment(4, F, 0, true, 0x90);
O << "\t.globl\t" << CurrentFnName << "\n";
O << "\t.weak_definition\t" << CurrentFnName << "\n";
} else if (Subtarget->isTargetCygMing()) {
More information about the llvm-commits
mailing list