Home | History | Annotate | Download | only in MCTargetDesc
      1 //===-- PPCMCAsmInfo.cpp - PPC asm properties -----------------------------===//
      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 void PPCMCAsmInfoDarwin::anchor() { }
     18 
     19 PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
     20   if (is64Bit) {
     21     PointerSize = CalleeSaveStackSlotSize = 8;
     22   }
     23   IsLittleEndian = false;
     24 
     25   PCSymbol = ".";
     26   CommentString = ";";
     27   ExceptionsType = ExceptionHandling::DwarfCFI;
     28 
     29   if (!is64Bit)
     30     Data64bitsDirective = 0;      // We can't emit a 64-bit unit in PPC32 mode.
     31 
     32   AssemblerDialect = 1;           // New-Style mnemonics.
     33   SupportsDebugInformation= true; // Debug information.
     34 }
     35 
     36 void PPCLinuxMCAsmInfo::anchor() { }
     37 
     38 PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
     39   if (is64Bit) {
     40     PointerSize = CalleeSaveStackSlotSize = 8;
     41   }
     42   IsLittleEndian = false;
     43 
     44   // ".comm align is in bytes but .align is pow-2."
     45   AlignmentIsInBytes = false;
     46 
     47   CommentString = "#";
     48   GlobalPrefix = "";
     49   PrivateGlobalPrefix = ".L";
     50   WeakRefDirective = "\t.weak\t";
     51 
     52   // Uses '.section' before '.bss' directive
     53   UsesELFSectionDirectiveForBSS = true;
     54 
     55   // Debug Information
     56   SupportsDebugInformation = true;
     57 
     58   PCSymbol = ".";
     59 
     60   // Set up DWARF directives
     61   HasLEB128 = true;  // Target asm supports leb128 directives (little-endian)
     62 
     63   // Exceptions handling
     64   ExceptionsType = ExceptionHandling::DwarfCFI;
     65 
     66   ZeroDirective = "\t.space\t";
     67   Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
     68   AssemblerDialect = 0;           // Old-Style mnemonics.
     69 }
     70 
     71