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"
|
Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).
For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.
This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.
This commit also contains a trivial patch to clang to account for the C++ API
change. Thanks go to Pavel Labath for fixing LLDB for me.
Reviewers: rengolin
Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10969
llvm-svn: 247692
2015-09-15 14:08:28 +00:00
|
|
|
#include "llvm/ADT/TargetTuple.h"
|
2015-01-14 11:23:27 +00:00
|
|
|
#include "llvm/Support/CommandLine.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() { }
|
|
|
|
|
Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).
For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.
This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.
This commit also contains a trivial patch to clang to account for the C++ API
change. Thanks go to Pavel Labath for fixing LLDB for me.
Reviewers: rengolin
Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10969
llvm-svn: 247692
2015-09-15 14:08:28 +00:00
|
|
|
ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(const TargetTuple &TT) {
|
|
|
|
if ((TT.getArch() == TargetTuple::armeb) ||
|
|
|
|
(TT.getArch() == TargetTuple::thumbeb))
|
2014-03-28 14:35:30 +00:00
|
|
|
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() { }
|
|
|
|
|
Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).
For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.
This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.
This commit also contains a trivial patch to clang to account for the C++ API
change. Thanks go to Pavel Labath for fixing LLDB for me.
Reviewers: rengolin
Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10969
llvm-svn: 247692
2015-09-15 14:08:28 +00:00
|
|
|
ARMELFMCAsmInfo::ARMELFMCAsmInfo(const TargetTuple &TT) {
|
|
|
|
if ((TT.getArch() == TargetTuple::armeb) ||
|
|
|
|
(TT.getArch() == TargetTuple::thumbeb))
|
2014-03-28 14:35:30 +00:00
|
|
|
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
|
Re-commit r247683: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC.
Summary:
This is the first patch in the series to migrate Triple's (which are ambiguous)
to TargetTuple's (which aren't).
For the moment, TargetTuple simply passes all requests to the Triple object it
holds. Once it has replaced Triple, it will start to implement the interface in
a more suitable way.
This change makes some changes to the public C++ API. In particular,
InitMCSubtargetInfo(), createMCRelocationInfo(), and createMCSymbolizer()
now take TargetTuples instead of Triples. The other public C++ API's have
been left as-is for the moment to reduce patch size.
This commit also contains a trivial patch to clang to account for the C++ API
change. Thanks go to Pavel Labath for fixing LLDB for me.
Reviewers: rengolin
Subscribers: jyknight, dschuff, arsenm, rampitec, danalbert, srhines, javed.absar, dsanders, echristo, emaste, jholewinski, tberghammer, ted, jfb, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D10969
llvm-svn: 247692
2015-09-15 14:08:28 +00:00
|
|
|
switch (TT.getOS()) {
|
|
|
|
case TargetTuple::Bitrig:
|
|
|
|
case TargetTuple::NetBSD:
|
2014-05-07 07:49:34 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|