2009-08-22 20:48:53 +00:00
|
|
|
//===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===//
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2009-08-22 21:03:30 +00:00
|
|
|
// This file contains the declarations of the MCAsmInfoDarwin properties.
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-08-22 20:48:53 +00:00
|
|
|
#include "PPCMCAsmInfo.h"
|
2006-09-07 22:05:02 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2010-01-20 06:34:14 +00:00
|
|
|
PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
|
2007-02-01 16:31:34 +00:00
|
|
|
PCSymbol = ".";
|
2006-12-21 20:26:09 +00:00
|
|
|
CommentString = ";";
|
2011-01-14 21:58:08 +00:00
|
|
|
ExceptionsType = ExceptionHandling::DwarfTable;
|
2009-08-11 00:09:57 +00:00
|
|
|
|
2009-08-13 17:03:38 +00:00
|
|
|
if (!is64Bit)
|
2009-08-11 22:49:34 +00:00
|
|
|
Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
|
2010-12-04 03:21:47 +00:00
|
|
|
|
2009-08-11 23:03:40 +00:00
|
|
|
AssemblerDialect = 1; // New-Style mnemonics.
|
2010-01-06 02:21:00 +00:00
|
|
|
SupportsDebugInformation= true; // Debug information.
|
2006-12-21 20:26:09 +00:00
|
|
|
}
|
|
|
|
|
2010-01-20 06:34:14 +00:00
|
|
|
PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
|
2010-02-06 03:32:21 +00:00
|
|
|
// ".comm align is in bytes but .align is pow-2."
|
|
|
|
AlignmentIsInBytes = false;
|
|
|
|
|
2006-12-21 20:26:09 +00:00
|
|
|
CommentString = "#";
|
|
|
|
GlobalPrefix = "";
|
2008-12-19 10:55:56 +00:00
|
|
|
PrivateGlobalPrefix = ".L";
|
2006-12-21 20:26:09 +00:00
|
|
|
WeakRefDirective = "\t.weak\t";
|
2009-08-13 23:30:21 +00:00
|
|
|
|
|
|
|
// Uses '.section' before '.bss' directive
|
|
|
|
UsesELFSectionDirectiveForBSS = true;
|
2007-07-25 03:48:45 +00:00
|
|
|
|
2007-12-21 12:19:44 +00:00
|
|
|
// Debug Information
|
|
|
|
SupportsDebugInformation = true;
|
|
|
|
|
|
|
|
PCSymbol = ".";
|
|
|
|
|
|
|
|
// Set up DWARF directives
|
|
|
|
HasLEB128 = true; // Target asm supports leb128 directives (little-endian)
|
|
|
|
|
|
|
|
// Exceptions handling
|
2009-08-13 17:03:38 +00:00
|
|
|
if (!is64Bit)
|
2011-01-14 21:58:08 +00:00
|
|
|
ExceptionsType = ExceptionHandling::DwarfTable;
|
2009-08-11 22:06:07 +00:00
|
|
|
|
|
|
|
ZeroDirective = "\t.space\t";
|
2009-08-13 17:03:38 +00:00
|
|
|
Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
|
2010-01-23 07:47:02 +00:00
|
|
|
HasLCOMMDirective = true;
|
2009-08-11 23:03:40 +00:00
|
|
|
AssemblerDialect = 0; // Old-Style mnemonics.
|
2006-12-21 20:26:09 +00:00
|
|
|
}
|
2008-02-27 23:49:15 +00:00
|
|
|
|