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;
|
|
|
|
|
2009-08-22 21:03:30 +00:00
|
|
|
PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
|
2007-02-01 16:31:34 +00:00
|
|
|
PCSymbol = ".";
|
2006-12-21 20:26:09 +00:00
|
|
|
CommentString = ";";
|
2009-08-11 00:09:57 +00:00
|
|
|
ExceptionsType = ExceptionHandling::Dwarf;
|
|
|
|
|
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.
|
2009-08-11 23:03:40 +00:00
|
|
|
AssemblerDialect = 1; // New-Style mnemonics.
|
2006-12-21 20:26:09 +00:00
|
|
|
}
|
|
|
|
|
2009-08-22 20:48:53 +00:00
|
|
|
PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
|
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
|
|
|
UsedDirective = "\t# .no_dead_strip\t";
|
|
|
|
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
|
|
|
|
AbsoluteDebugSectionOffsets = true;
|
|
|
|
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)
|
2009-08-11 00:09:57 +00:00
|
|
|
ExceptionsType = ExceptionHandling::Dwarf;
|
2007-12-21 12:19:44 +00:00
|
|
|
AbsoluteEHSectionOffsets = false;
|
2009-08-11 22:06:07 +00:00
|
|
|
|
|
|
|
ZeroDirective = "\t.space\t";
|
|
|
|
SetDirective = "\t.set";
|
2009-08-13 17:03:38 +00:00
|
|
|
Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
|
2009-08-11 22:06:07 +00:00
|
|
|
AlignmentIsInBytes = false;
|
|
|
|
LCOMMDirective = "\t.lcomm\t";
|
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
|
|
|
|