Home | History | Annotate | Download | only in MCTargetDesc
      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   if (is64Bit)
     35     PointerSize = 8;
     36   IsLittleEndian = false;
     37 
     38   // ".comm align is in bytes but .align is pow-2."
     39   AlignmentIsInBytes = false;
     40 
     41   CommentString = "#";
     42   GlobalPrefix = "";
     43   PrivateGlobalPrefix = ".L";
     44   WeakRefDirective = "\t.weak\t";
     45 
     46   // Uses '.section' before '.bss' directive
     47   UsesELFSectionDirectiveForBSS = true;
     48 
     49   // Debug Information
     50   SupportsDebugInformation = true;
     51 
     52   PCSymbol = ".";
     53 
     54   // Set up DWARF directives
     55   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
     56 
     57   // Exceptions handling
     58   if (!is64Bit)
     59     ExceptionsType = ExceptionHandling::DwarfCFI;
     60 
     61   ZeroDirective = "\t.space\t";
     62   Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
     63   LCOMMDirectiveType = LCOMM::NoAlignment;
     64   AssemblerDialect = 0;           // Old-Style mnemonics.
     65 }
     66 
     67