2009-08-23 04:48:53 +08:00
|
|
|
//===-- PPCMCAsmInfo.cpp - PPC asm properties -------------------*- C++ -*-===//
|
2006-09-08 06:05:02 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-30 04:36:04 +08:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-09-08 06:05:02 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2009-08-23 05:03:30 +08:00
|
|
|
// This file contains the declarations of the MCAsmInfoDarwin properties.
|
2006-09-08 06:05:02 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-08-23 04:48:53 +08:00
|
|
|
#include "PPCMCAsmInfo.h"
|
2006-09-08 06:05:02 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2009-08-23 05:03:30 +08:00
|
|
|
PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(bool is64Bit) {
|
2007-02-02 00:31:34 +08:00
|
|
|
PCSymbol = ".";
|
2006-12-22 04:26:09 +08:00
|
|
|
CommentString = ";";
|
2009-08-11 08:09:57 +08:00
|
|
|
ExceptionsType = ExceptionHandling::Dwarf;
|
|
|
|
|
2009-08-14 01:03:38 +08:00
|
|
|
if (!is64Bit)
|
2009-08-12 06:49:34 +08:00
|
|
|
Data64bitsDirective = 0; // We can't emit a 64-bit unit in PPC32 mode.
|
2009-08-12 07:03:40 +08:00
|
|
|
AssemblerDialect = 1; // New-Style mnemonics.
|
2006-12-22 04:26:09 +08:00
|
|
|
}
|
|
|
|
|
2009-08-23 04:48:53 +08:00
|
|
|
PPCLinuxMCAsmInfo::PPCLinuxMCAsmInfo(bool is64Bit) {
|
2006-12-22 04:26:09 +08:00
|
|
|
CommentString = "#";
|
|
|
|
GlobalPrefix = "";
|
2008-12-19 18:55:56 +08:00
|
|
|
PrivateGlobalPrefix = ".L";
|
2006-12-22 04:26:09 +08:00
|
|
|
UsedDirective = "\t# .no_dead_strip\t";
|
|
|
|
WeakRefDirective = "\t.weak\t";
|
2009-08-14 07:30:21 +08:00
|
|
|
|
|
|
|
// Uses '.section' before '.bss' directive
|
|
|
|
UsesELFSectionDirectiveForBSS = true;
|
2007-07-25 11:48:45 +08:00
|
|
|
|
2007-12-21 20:19:44 +08: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-14 01:03:38 +08:00
|
|
|
if (!is64Bit)
|
2009-08-11 08:09:57 +08:00
|
|
|
ExceptionsType = ExceptionHandling::Dwarf;
|
2007-12-21 20:19:44 +08:00
|
|
|
AbsoluteEHSectionOffsets = false;
|
2009-08-12 06:06:07 +08:00
|
|
|
|
|
|
|
ZeroDirective = "\t.space\t";
|
|
|
|
SetDirective = "\t.set";
|
2009-08-14 01:03:38 +08:00
|
|
|
Data64bitsDirective = is64Bit ? "\t.quad\t" : 0;
|
2009-08-12 06:06:07 +08:00
|
|
|
AlignmentIsInBytes = false;
|
|
|
|
LCOMMDirective = "\t.lcomm\t";
|
2009-08-12 07:03:40 +08:00
|
|
|
AssemblerDialect = 0; // Old-Style mnemonics.
|
2006-12-22 04:26:09 +08:00
|
|
|
}
|
2008-02-28 07:49:15 +08:00
|
|
|
|