]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
[FreeBSD/stable/9.git] / contrib / llvm / lib / Target / PowerPC / MCTargetDesc / 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) {
18   if (is64Bit)
19     PointerSize = 8;
20   IsLittleEndian = false;
21
22   PCSymbol = ".";
23   CommentString = ";";
24   ExceptionsType = ExceptionHandling::DwarfCFI;
25
26   if (!is64Bit)
27     Data64bitsDirective = 0;      // We can't emit a 64-bit unit in PPC32 mode.
28
29   AssemblerDialect = 1;           // New-Style mnemonics.
30   SupportsDebugInformation= true; // Debug information.
31 }
32
33 PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
34   // ".comm align is in bytes but .align is pow-2."
35   AlignmentIsInBytes = false;
36
37   CommentString = "#";
38   GlobalPrefix = "";
39   PrivateGlobalPrefix = ".L";
40   WeakRefDirective = "\t.weak\t";
41   
42   // Uses '.section' before '.bss' directive
43   UsesELFSectionDirectiveForBSS = true;  
44
45   // Debug Information
46   SupportsDebugInformation = true;
47
48   PCSymbol = ".";
49
50   // Set up DWARF directives
51   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
52
53   // Exceptions handling
54   if (!is64Bit)
55     ExceptionsType = ExceptionHandling::DwarfCFI;
56     
57   ZeroDirective = "\t.space\t";
58   Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
59   HasLCOMMDirective = true;
60   AssemblerDialect = 0;           // Old-Style mnemonics.
61 }
62