give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
[oota-llvm.git] / lib / Target / PowerPC / PPCMCAsmInfo.cpp
1 //===-- PPCMCAsmInfo.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 MCAsmInfoDarwin properties.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "PPCMCAsmInfo.h"
15 using namespace llvm;
16
17 PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) : MCAsmInfoDarwin(false) {
18   PCSymbol = ".";
19   CommentString = ";";
20   ExceptionsType = ExceptionHandling::Dwarf;
21
22   if (!is64Bit)
23     Data64bitsDirective = 0;      // We can't emit a 64-bit unit in PPC32 mode.
24   AssemblerDialect = 1;           // New-Style mnemonics.
25   SupportsDebugInformation= true; // Debug information.
26 }
27
28 PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) : MCAsmInfo(false)  {
29   CommentString = "#";
30   GlobalPrefix = "";
31   PrivateGlobalPrefix = ".L";
32   UsedDirective = "\t# .no_dead_strip\t";
33   WeakRefDirective = "\t.weak\t";
34   
35   // Uses '.section' before '.bss' directive
36   UsesELFSectionDirectiveForBSS = true;  
37
38   // Debug Information
39   AbsoluteDebugSectionOffsets = true;
40   SupportsDebugInformation = true;
41
42   PCSymbol = ".";
43
44   // Set up DWARF directives
45   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
46
47   // Exceptions handling
48   if (!is64Bit)
49     ExceptionsType = ExceptionHandling::Dwarf;
50   AbsoluteEHSectionOffsets = false;
51     
52   ZeroDirective = "\t.space\t";
53   SetDirective = "\t.set";
54   Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
55   AlignmentIsInBytes = false;
56   LCOMMDirective = "\t.lcomm\t";
57   AssemblerDialect = 0;           // Old-Style mnemonics.
58 }
59