1234353Sdim//===-- PPCMCAsmInfo.cpp - PPC asm properties -----------------------------===// 2224133Sdim// 3224133Sdim// The LLVM Compiler Infrastructure 4224133Sdim// 5224133Sdim// This file is distributed under the University of Illinois Open Source 6224133Sdim// License. See LICENSE.TXT for details. 7224133Sdim// 8224133Sdim//===----------------------------------------------------------------------===// 9224133Sdim// 10224133Sdim// This file contains the declarations of the MCAsmInfoDarwin properties. 11224133Sdim// 12224133Sdim//===----------------------------------------------------------------------===// 13224133Sdim 14224133Sdim#include "PPCMCAsmInfo.h" 15266715Sdim#include "llvm/ADT/Triple.h" 16266715Sdim 17224133Sdimusing namespace llvm; 18224133Sdim 19234353Sdimvoid PPCMCAsmInfoDarwin::anchor() { } 20234353Sdim 21266715Sdim/// This version of the constructor is here to maintain ABI compatibility with 22266715Sdim/// LLVM 3.4.0 23224133SdimPPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) { 24249423Sdim if (is64Bit) { 25249423Sdim PointerSize = CalleeSaveStackSlotSize = 8; 26249423Sdim } 27224133Sdim IsLittleEndian = false; 28224133Sdim 29224133Sdim CommentString = ";"; 30224133Sdim ExceptionsType = ExceptionHandling::DwarfCFI; 31224133Sdim 32224133Sdim if (!is64Bit) 33224133Sdim Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. 34224133Sdim 35224133Sdim AssemblerDialect = 1; // New-Style mnemonics. 36224133Sdim SupportsDebugInformation= true; // Debug information. 37224133Sdim} 38224133Sdim 39266715SdimPPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit, const Triple& T) { 40266715Sdim if (is64Bit) { 41266715Sdim PointerSize = CalleeSaveStackSlotSize = 8; 42266715Sdim } 43266715Sdim IsLittleEndian = false; 44266715Sdim 45266715Sdim CommentString = ";"; 46266715Sdim ExceptionsType = ExceptionHandling::DwarfCFI; 47266715Sdim 48266715Sdim if (!is64Bit) 49266715Sdim Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode. 50266715Sdim 51266715Sdim AssemblerDialect = 1; // New-Style mnemonics. 52266715Sdim SupportsDebugInformation= true; // Debug information. 53266715Sdim 54266715Sdim // old assembler lacks some directives 55266715Sdim // FIXME: this should really be a check on the assembler characteristics 56266715Sdim // rather than OS version 57266715Sdim if (T.isMacOSX() && T.isMacOSXVersionLT(10, 6)) 58266715Sdim HasWeakDefCanBeHiddenDirective = false; 59266715Sdim} 60266715Sdim 61234353Sdimvoid PPCLinuxMCAsmInfo::anchor() { } 62234353Sdim 63224133SdimPPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) { 64249423Sdim if (is64Bit) { 65249423Sdim PointerSize = CalleeSaveStackSlotSize = 8; 66249423Sdim } 67226633Sdim IsLittleEndian = false; 68226633Sdim 69224133Sdim // ".comm align is in bytes but .align is pow-2." 70224133Sdim AlignmentIsInBytes = false; 71224133Sdim 72224133Sdim CommentString = "#"; 73224133Sdim GlobalPrefix = ""; 74224133Sdim PrivateGlobalPrefix = ".L"; 75263508Sdim 76224133Sdim // Uses '.section' before '.bss' directive 77224133Sdim UsesELFSectionDirectiveForBSS = true; 78224133Sdim 79224133Sdim // Debug Information 80224133Sdim SupportsDebugInformation = true; 81224133Sdim 82263508Sdim DollarIsPC = true; 83224133Sdim 84224133Sdim // Set up DWARF directives 85224133Sdim HasLEB128 = true; // Target asm supports leb128 directives (little-endian) 86263508Sdim MinInstAlignment = 4; 87224133Sdim 88224133Sdim // Exceptions handling 89243830Sdim ExceptionsType = ExceptionHandling::DwarfCFI; 90224133Sdim 91224133Sdim ZeroDirective = "\t.space\t"; 92224133Sdim Data64bitsDirective = is64Bit ? "\t.quad\t" : 0; 93263508Sdim AssemblerDialect = 1; // New-Style mnemonics. 94224133Sdim} 95224133Sdim 96