LLVM  8.0.1
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  // Conditional Thumb 4-byte instructions can have an implicit IT.
35  MaxInstLength = 6;
36 
37  // Exceptions handling
38  ExceptionsType = (TheTriple.isOSDarwin() && !TheTriple.isWatchABI())
41 
43 }
44 
45 void ARMELFMCAsmInfo::anchor() { }
46 
48  if ((TheTriple.getArch() == Triple::armeb) ||
49  (TheTriple.getArch() == Triple::thumbeb))
50  IsLittleEndian = false;
51 
52  // ".comm align is in bytes but .align is pow-2."
53  AlignmentIsInBytes = false;
54 
55  Data64bitsDirective = nullptr;
56  CommentString = "@";
57  Code16Directive = ".code\t16";
58  Code32Directive = ".code\t32";
59 
61 
62  // Conditional Thumb 4-byte instructions can have an implicit IT.
63  MaxInstLength = 6;
64 
65  // Exceptions handling
66  switch (TheTriple.getOS()) {
67  case Triple::NetBSD:
69  break;
70  default:
72  break;
73  }
74 
75  // foo(plt) instead of foo@plt
77 
79 }
80 
82  UseIntegratedAssembler = Value;
84  // gas doesn't handle VFP register names in cfi directives,
85  // so don't use register names with external assembler.
86  // See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
87  DwarfRegNumForCFI = true;
88  }
89 }
90 
91 void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
92 
94  AlignmentIsInBytes = false;
96  PrivateGlobalPrefix = "$M";
97  PrivateLabelPrefix = "$M";
98  CommentString = ";";
99 
100  // Conditional Thumb 4-byte instructions can have an implicit IT.
101  MaxInstLength = 6;
102 }
103 
104 void ARMCOFFMCAsmInfoGNU::anchor() { }
105 
107  AlignmentIsInBytes = false;
109 
110  CommentString = "@";
111  Code16Directive = ".code\t16";
112  Code32Directive = ".code\t32";
113  PrivateGlobalPrefix = ".L";
114  PrivateLabelPrefix = ".L";
115 
119 
120  UseIntegratedAssembler = true;
121  DwarfRegNumForCFI = false;
122 
123  // Conditional Thumb 4-byte instructions can have an implicit IT.
124  MaxInstLength = 6;
125 }
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:283
const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
Definition: MCAsmInfo.h:148
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
Definition: Triple.h:475
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:371
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:132
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in .cfi_* directives.
Definition: MCAsmInfo.h:350
This class represents lattice values for constants.
Definition: AllocatorList.h:24
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Definition: Triple.h:299
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:193
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:70
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:231
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:114
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:290
const char * Code32Directive
Definition: MCAsmInfo.h:149
ARMMCAsmInfoDarwin(const Triple &TheTriple)
bool isWatchABI() const
Definition: Triple.h:470
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:332
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
ARMELFMCAsmInfo(const Triple &TT)
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:335
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives...
Definition: MCAsmInfo.h:166
LLVM Value Representation.
Definition: Value.h:73
No exception support.
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition: MCAsmInfo.h:128
unsigned MaxInstLength
This is the maximum possible length of an instruction, which is needed to compute the size of an inli...
Definition: MCAsmInfo.h:98
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of .
Definition: MCAsmInfo.h:354