2012-02-18 12:03:15 +00:00
|
|
|
//===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===//
|
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 20:48:53 +00:00
|
|
|
// This file contains the declarations of the ARMMCAsmInfo properties.
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-08-22 20:48:53 +00:00
|
|
|
#include "ARMMCAsmInfo.h"
|
2011-03-05 18:43:15 +00:00
|
|
|
#include "llvm/Support/CommandLine.h"
|
2014-03-28 14:35:30 +00:00
|
|
|
#include "llvm/ADT/Triple.h"
|
2011-03-05 18:43:15 +00:00
|
|
|
|
2006-09-07 22:05:02 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2011-12-20 02:50:00 +00:00
|
|
|
void ARMMCAsmInfoDarwin::anchor() { }
|
|
|
|
|
2014-03-28 14:35:30 +00:00
|
|
|
ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(StringRef TT) {
|
|
|
|
Triple TheTriple(TT);
|
|
|
|
if ((TheTriple.getArch() == Triple::armeb) ||
|
|
|
|
(TheTriple.getArch() == Triple::thumbeb))
|
|
|
|
IsLittleEndian = false;
|
|
|
|
|
2014-04-25 05:30:21 +00:00
|
|
|
Data64bitsDirective = nullptr;
|
2009-08-11 22:14:59 +00:00
|
|
|
CommentString = "@";
|
2011-07-27 00:38:12 +00:00
|
|
|
Code16Directive = ".code\t16";
|
|
|
|
Code32Directive = ".code\t32";
|
2012-05-18 19:12:01 +00:00
|
|
|
UseDataRegionDirectives = true;
|
2011-07-27 00:38:12 +00:00
|
|
|
|
2009-06-19 21:54:26 +00:00
|
|
|
SupportsDebugInformation = true;
|
2009-08-11 00:09:57 +00:00
|
|
|
|
|
|
|
// Exceptions handling
|
|
|
|
ExceptionsType = ExceptionHandling::SjLj;
|
2014-02-13 14:44:26 +00:00
|
|
|
|
|
|
|
UseIntegratedAssembler = true;
|
2008-08-07 09:54:23 +00:00
|
|
|
}
|
|
|
|
|
2011-12-20 02:50:00 +00:00
|
|
|
void ARMELFMCAsmInfo::anchor() { }
|
|
|
|
|
2014-03-28 14:35:30 +00:00
|
|
|
ARMELFMCAsmInfo::ARMELFMCAsmInfo(StringRef TT) {
|
|
|
|
Triple TheTriple(TT);
|
|
|
|
if ((TheTriple.getArch() == Triple::armeb) ||
|
|
|
|
(TheTriple.getArch() == Triple::thumbeb))
|
|
|
|
IsLittleEndian = false;
|
|
|
|
|
2010-01-26 20:21:43 +00:00
|
|
|
// ".comm align is in bytes but .align is pow-2."
|
|
|
|
AlignmentIsInBytes = false;
|
|
|
|
|
2014-04-25 05:30:21 +00:00
|
|
|
Data64bitsDirective = nullptr;
|
2009-08-11 22:14:59 +00:00
|
|
|
CommentString = "@";
|
2011-07-27 00:38:12 +00:00
|
|
|
Code16Directive = ".code\t16";
|
|
|
|
Code32Directive = ".code\t32";
|
|
|
|
|
2009-06-19 21:54:26 +00:00
|
|
|
SupportsDebugInformation = true;
|
2011-03-05 18:43:15 +00:00
|
|
|
|
|
|
|
// Exceptions handling
|
2014-05-07 07:49:34 +00:00
|
|
|
switch (TheTriple.getOS()) {
|
|
|
|
case Triple::NetBSD:
|
|
|
|
ExceptionsType = ExceptionHandling::DwarfCFI;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
ExceptionsType = ExceptionHandling::ARM;
|
|
|
|
break;
|
|
|
|
}
|
2013-12-04 22:43:20 +00:00
|
|
|
|
|
|
|
// foo(plt) instead of foo@plt
|
|
|
|
UseParensForSymbolVariant = true;
|
2014-02-13 14:44:26 +00:00
|
|
|
|
|
|
|
UseIntegratedAssembler = true;
|
2014-03-13 15:56:41 +00:00
|
|
|
}
|
2014-03-12 03:52:34 +00:00
|
|
|
|
2014-03-13 15:56:41 +00:00
|
|
|
void ARMELFMCAsmInfo::setUseIntegratedAssembler(bool Value) {
|
|
|
|
UseIntegratedAssembler = Value;
|
|
|
|
if (!UseIntegratedAssembler) {
|
|
|
|
// gas doesn't handle VFP register names in cfi directives,
|
|
|
|
// so don't use register names with external assembler.
|
|
|
|
// See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
|
|
|
|
DwarfRegNumForCFI = true;
|
|
|
|
}
|
2008-08-07 09:54:23 +00:00
|
|
|
}
|
2014-04-02 20:32:05 +00:00
|
|
|
|
|
|
|
void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
|
|
|
|
|
|
|
|
ARMCOFFMCAsmInfoMicrosoft::ARMCOFFMCAsmInfoMicrosoft() {
|
|
|
|
AlignmentIsInBytes = false;
|
|
|
|
|
|
|
|
PrivateGlobalPrefix = "$M";
|
2014-12-04 00:06:57 +00:00
|
|
|
PrivateLabelPrefix = "$M";
|
2014-04-02 20:32:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ARMCOFFMCAsmInfoGNU::anchor() { }
|
|
|
|
|
|
|
|
ARMCOFFMCAsmInfoGNU::ARMCOFFMCAsmInfoGNU() {
|
|
|
|
AlignmentIsInBytes = false;
|
2014-04-27 03:47:57 +00:00
|
|
|
HasSingleParameterDotFile = true;
|
2014-04-02 20:32:05 +00:00
|
|
|
|
|
|
|
CommentString = "@";
|
|
|
|
Code16Directive = ".code\t16";
|
|
|
|
Code32Directive = ".code\t32";
|
|
|
|
PrivateGlobalPrefix = ".L";
|
2014-12-04 00:06:57 +00:00
|
|
|
PrivateLabelPrefix = ".L";
|
2014-04-02 20:32:05 +00:00
|
|
|
|
|
|
|
SupportsDebugInformation = true;
|
|
|
|
ExceptionsType = ExceptionHandling::None;
|
|
|
|
UseParensForSymbolVariant = true;
|
|
|
|
|
|
|
|
UseIntegratedAssembler = false;
|
|
|
|
DwarfRegNumForCFI = true;
|
|
|
|
}
|
|
|
|
|