[llvm-commits] [llvm] r40483 - in /llvm/trunk/lib/Target/PowerPC: PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp

Nick Lewycky nicholas at mxc.ca
Tue Jul 24 20:48:46 PDT 2007


Author: nicholas
Date: Tue Jul 24 22:48:45 2007
New Revision: 40483

URL: http://llvm.org/viewvc/llvm-project?rev=40483&view=rev
Log:
Fix debug info and globals filled with zeros.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
    llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=40483&r1=40482&r2=40483&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Tue Jul 24 22:48:45 2007
@@ -668,8 +668,8 @@
       if (I->hasExternalLinkage()) {
         O << "\t.global " << name << '\n';
         O << "\t.type " << name << ", @object\n";
-        //O << "\t.zerofill __DATA, __common, " << name << ", "
-        //  << Size << ", " << Align;
+        O << name << ":\n";
+        O << "\t.zero " << Size << "\n";
       } else if (I->hasInternalLinkage()) {
         SwitchToDataSection("\t.data", I);
         O << TAI->getLCOMMDirective() << name << "," << Size;

Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=40483&r1=40482&r2=40483&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Tue Jul 24 22:48:45 2007
@@ -30,17 +30,6 @@
   
   NeedsSet = true;
   AddressSize = isPPC64 ? 8 : 4;
-  DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
-  DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
-  DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
-  DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
-  DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
-  DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
-  DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
-  DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
-  DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
-  DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
-  DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
   DwarfEHFrameSection =
   ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
   DwarfExceptionSection = ".section __DATA,__gcc_except_tab";
@@ -71,6 +60,18 @@
   WeakRefDirective = "\t.weak_reference\t";
   HiddenDirective = "\t.private_extern\t";
   SupportsExceptionHandling = true;
+
+  DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
+  DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
+  DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
+  DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
+  DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
+  DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
+  DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
+  DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
+  DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
+  DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
+  DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
   
   // In non-PIC modes, emit a special label before jump tables so that the
   // linker can perform more accurate dead code stripping.
@@ -93,4 +94,16 @@
   StaticDtorsSection = ".section\t.dtors,\"aw\", at progbits";
   UsedDirective = "\t# .no_dead_strip\t";
   WeakRefDirective = "\t.weak\t";
+
+  DwarfAbbrevSection =  "\t.section\t.debug_abbrev,\"\", at progbits";
+  DwarfInfoSection =    "\t.section\t.debug_info,\"\", at progbits";
+  DwarfLineSection =    "\t.section\t.debug_line,\"\", at progbits";
+  DwarfFrameSection =   "\t.section\t.debug_frame,\"\", at progbits";
+  DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\", at progbits";
+  DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\", at progbits";
+  DwarfStrSection =     "\t.section\t.debug_str,\"\", at progbits";
+  DwarfLocSection =     "\t.section\t.debug_loc,\"\", at progbits";
+  DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits";
+  DwarfRangesSection =  "\t.section\t.debug_ranges,\"\", at progbits";
+  DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits";
 }





More information about the llvm-commits mailing list