I've done some work on a Linux subtarget for the PPC target. Since I
can't test how these affect Darwin PPC, I'm going to email them here
starting with little changes and building up. Note that I will not be
submitting complete PPC/Linux support; this is just a start that someone
else can continue.

There shouldn't be any issue with this one unless
TAI->getCommentString() returns the wrong value on Darwin.

Nick Lewycky

Index: lib/Target/PowerPC/PPCAsmPrinter.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp,v
retrieving revision 1.222
diff -u -w -r1.222 PPCAsmPrinter.cpp
--- lib/Target/PowerPC/PPCAsmPrinter.cpp	18 Dec 2006 03:37:18 -0000	1.222
+++ lib/Target/PowerPC/PPCAsmPrinter.cpp	19 Dec 2006 01:01:12 -0000
@@ -616,7 +616,7 @@
         SwitchToDataSection("\t.data", I);
         O << ".comm " << name << "," << Size;
       }
-      O << "\t\t; '" << I->getName() << "'\n";
+      O << "\t\t" << TAI->getCommentString() << " '" << I->getName() << "'\n";
     } else {
       switch (I->getLinkage()) {
       case GlobalValue::LinkOnceLinkage:
@@ -649,7 +649,8 @@
       }
 
       EmitAlignment(Align, I);
-      O << name << ":\t\t\t\t; '" << I->getName() << "'\n";
+      O << name << ":\t\t\t\t" << TAI->getCommentString() << " '"
+        << I->getName() << "'\n";
 
       // If the initializer is a extern weak symbol, remember to emit the weak
       // reference!
@@ -751,7 +752,7 @@
 
 
 
-/// createDarwinCodePrinterPass - Returns a pass that prints the PPC assembly
+/// createPPCAsmPrinterPass - Returns a pass that prints the PPC assembly
 /// code for a MachineFunction to the given output stream, in a format that the
 /// Darwin assembler can deal with.
 ///

_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to