LLVM  7.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::NetBSD:
63  break;
64  default:
66  break;
67  }
68 
69  // foo(plt) instead of foo@plt
71 
73 }
74 
76  UseIntegratedAssembler = Value;
78  // gas doesn't handle VFP register names in cfi directives,
79  // so don't use register names with external assembler.
80  // See https://sourceware.org/bugzilla/show_bug.cgi?id=16694
81  DwarfRegNumForCFI = true;
82  }
83 }
84 
85 void ARMCOFFMCAsmInfoMicrosoft::anchor() { }
86 
88  AlignmentIsInBytes = false;
90  PrivateGlobalPrefix = "$M";
91  PrivateLabelPrefix = "$M";
92  CommentString = ";";
93 }
94 
95 void ARMCOFFMCAsmInfoGNU::anchor() { }
96 
98  AlignmentIsInBytes = false;
100 
101  CommentString = "@";
102  Code16Directive = ".code\t16";
103  Code32Directive = ".code\t32";
104  PrivateGlobalPrefix = ".L";
105  PrivateLabelPrefix = ".L";
106 
110 
111  UseIntegratedAssembler = true;
112  DwarfRegNumForCFI = false;
113 }
114 
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:470
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
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Definition: Triple.h:294
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:285
const char * Code32Directive
Definition: MCAsmInfo.h:149
ARMMCAsmInfoDarwin(const Triple &TheTriple)
bool isWatchABI() const
Definition: Triple.h:465
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
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of .
Definition: MCAsmInfo.h:354