LLVM  4.0.0
ARMMCAsmInfo.cpp
Go to the documentation of this file.
1 //===-- ARMMCAsmInfo.cpp - ARM asm properties -----------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the ARMMCAsmInfo properties.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #include "ARMMCAsmInfo.h"
15 #include "llvm/ADT/Triple.h"
16 
17 using namespace llvm;
18 
19 void ARMMCAsmInfoDarwin::anchor() { }
20 
22  if ((TheTriple.getArch() == Triple::armeb) ||
23  (TheTriple.getArch() == Triple::thumbeb))
24  IsLittleEndian = false;
25 
26  Data64bitsDirective = nullptr;
27  CommentString = "@";
28  Code16Directive = ".code\t16";
29  Code32Directive = ".code\t32";
31 
33 
34  // Exceptions handling
35  ExceptionsType = (TheTriple.isOSDarwin() && !TheTriple.isWatchABI())
38 
40 }
41 
42 void ARMELFMCAsmInfo::anchor() { }
43 
45  if ((TheTriple.getArch() == Triple::armeb) ||
46  (TheTriple.getArch() == Triple::thumbeb))
47  IsLittleEndian = false;
48 
49  // ".comm align is in bytes but .align is pow-2."
50  AlignmentIsInBytes = false;
51 
52  Data64bitsDirective = nullptr;
53  CommentString = "@";
54  Code16Directive = ".code\t16";
55  Code32Directive = ".code\t32";
56 
58 
59  // Exceptions handling
60  switch (TheTriple.getOS()) {
61  case Triple::Bitrig:
62  case Triple::NetBSD:
64  break;
65  default:
67  break;
68  }
69 
70  // foo(plt) instead of foo@plt
72 
74 }
75 
77  UseIntegratedAssembler = Value;
79  // gas doesn't handle VFP register names in cfi directives,
80  // so don't use register names with external assembler.
81  // See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
82  DwarfRegNumForCFI = true;
83  }
84 }
85 
86 void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
87 
89  AlignmentIsInBytes = false;
90 
91  PrivateGlobalPrefix = "$M";
92  PrivateLabelPrefix = "$M";
93  CommentString = ";";
94 }
95 
96 void ARMCOFFMCAsmInfoGNU::anchor() { }
97 
99  AlignmentIsInBytes = false;
101 
102  CommentString = "@";
103  Code16Directive = ".code\t16";
104  Code32Directive = ".code\t32";
105  PrivateGlobalPrefix = ".L";
106  PrivateLabelPrefix = ".L";
107 
111 
112  UseIntegratedAssembler = false;
113  DwarfRegNumForCFI = true;
114 }
115 
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:274
const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
Definition: MCAsmInfo.h:140
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Definition: Triple.h:279
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:358
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:124
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in .cfi_* directives.
Definition: MCAsmInfo.h:341
void setUseIntegratedAssembler(bool Value) override
Set whether assembly (inline or otherwise) should be parsed.
DWARF-like instruction based exceptions.
const char * Data64bitsDirective
Definition: MCAsmInfo.h:184
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:71
setjmp/longjmp based exceptions
bool AlignmentIsInBytes
If this is true (the default) then the asmprinter emits ".align N" directives, where N is the number ...
Definition: MCAsmInfo.h:222
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:106
const char * Code32Directive
Definition: MCAsmInfo.h:141
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:270
ARMMCAsmInfoDarwin(const Triple &TheTriple)
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:323
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
Definition: Triple.h:455
ARMELFMCAsmInfo(const Triple &TT)
bool isWatchABI() const
Definition: Triple.h:450
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:326
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives...
Definition: MCAsmInfo.h:158
LLVM Value Representation.
Definition: Value.h:71
No exception support.
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition: MCAsmInfo.h:120
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of
Definition: MCAsmInfo.h:345