fix a minor fixme. When building with SL and later tools, the ".eh" symbols
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetAsmInfo.cpp
1 //===-- PPCTargetAsmInfo.cpp - PPC asm properties ---------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the DarwinTargetAsmInfo properties.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "PPCTargetAsmInfo.h"
15 #include "llvm/ADT/Triple.h"
16 using namespace llvm;
17
18 PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const Triple &TheTriple) 
19   : DarwinTargetAsmInfo(TheTriple) {
20   PCSymbol = ".";
21   CommentString = ";";
22   ExceptionsType = ExceptionHandling::Dwarf;
23
24   if (TheTriple.getArch() != Triple::ppc64)
25     Data64bitsDirective = 0;      // We can't emit a 64-bit unit in PPC32 mode.
26   AssemblerDialect = 1;           // New-Style mnemonics.
27 }
28
29 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const Triple &TheTriple) {
30   CommentString = "#";
31   GlobalPrefix = "";
32   PrivateGlobalPrefix = ".L";
33   UsedDirective = "\t# .no_dead_strip\t";
34   WeakRefDirective = "\t.weak\t";
35
36   // Debug Information
37   AbsoluteDebugSectionOffsets = true;
38   SupportsDebugInformation = true;
39
40   PCSymbol = ".";
41
42   // Set up DWARF directives
43   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
44
45   // Exceptions handling
46   if (TheTriple.getArch() != Triple::ppc64) {
47     ExceptionsType = ExceptionHandling::Dwarf;
48     Data64bitsDirective = 0;
49   }
50   AbsoluteEHSectionOffsets = false;
51     
52   ZeroDirective = "\t.space\t";
53   SetDirective = "\t.set";
54   
55   AlignmentIsInBytes = false;
56   LCOMMDirective = "\t.lcomm\t";
57   AssemblerDialect = 0;           // Old-Style mnemonics.
58 }
59