darwin doesn't support .bss, but it does have .zerofill
[oota-llvm.git] / lib / Target / X86 / X86TargetAsmInfo.cpp
index 7371161b96d450f4ef67bed34ed7291bf6cd9db6..1735220ae2c206dc078077edaa397916229291d2 100644 (file)
@@ -47,6 +47,8 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
       Data64bitsDirective = 0;       // we can't emit a 64-bit unit
     ZeroDirective = "\t.space\t";  // ".space N" emits N zeros.
     PrivateGlobalPrefix = "L";     // Marker for constant pool idxs
+    BSSSection = 0;                       // no BSS section.
+    ZeroFillDirective = "\t.zerofill\t";  // Uses .zerofill
     ConstantPoolSection = "\t.const\n";
     JumpTableDataSection = "\t.const\n";
     CStringSection = "\t.cstring";
@@ -64,6 +66,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
     SetDirective = "\t.set";
     UsedDirective = "\t.no_dead_strip\t";
     WeakRefDirective = "\t.weak_reference\t";
+    HiddenDirective = "\t.private_extern\t";
     
     NeedsSet = true;
     DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
@@ -111,6 +114,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
     HasDotTypeDotSizeDirective = false;
     StaticCtorsSection = "\t.section .ctors,\"aw\"";
     StaticDtorsSection = "\t.section .dtors,\"aw\"";
+    HiddenDirective = NULL;
 
     // Set up DWARF directives
     HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
@@ -128,12 +132,12 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
     DwarfRangesSection =  "\t.section\t.debug_ranges,\"dr\"";
     DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"dr\"";
     break;
-    
-    break;
+
   case X86Subtarget::isWindows:
     GlobalPrefix = "_";
     HasDotTypeDotSizeDirective = false;
     break;
+
   default: break;
   }
   
@@ -161,6 +165,8 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) {
     DataSectionStartSuffix = "\tsegment 'DATA'";
     SectionEndDirectiveSuffix = "\tends\n";
   }
+
+  AssemblerDialect = Subtarget->getAsmFlavor();
 }
 
 bool X86TargetAsmInfo::LowerToBSwap(CallInst *CI) const {