Revert 78892 and 78895, these break generating working executables on
[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 using namespace llvm;
16
17 PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(bool is64Bit) {
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 }
26
27 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(bool is64Bit) {
28   CommentString = "#";
29   GlobalPrefix = "";
30   PrivateGlobalPrefix = ".L";
31   UsedDirective = "\t# .no_dead_strip\t";
32   WeakRefDirective = "\t.weak\t";
33
34   // Debug Information
35   AbsoluteDebugSectionOffsets = true;
36   SupportsDebugInformation = true;
37
38   PCSymbol = ".";
39
40   // Set up DWARF directives
41   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
42
43   // Exceptions handling
44   if (!is64Bit)
45     ExceptionsType = ExceptionHandling::Dwarf;
46   AbsoluteEHSectionOffsets = false;
47     
48   ZeroDirective = "\t.space\t";
49   SetDirective = "\t.set";
50   Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
51   AlignmentIsInBytes = false;
52   LCOMMDirective = "\t.lcomm\t";
53   AssemblerDialect = 0;           // Old-Style mnemonics.
54 }
55