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