LLVM  3.7.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"
17 
18 using namespace llvm;
19 
20 void ARMMCAsmInfoDarwin::anchor() { }
21 
23  if ((TheTriple.getArch() == Triple::armeb) ||
24  (TheTriple.getArch() == Triple::thumbeb))
25  IsLittleEndian = false;
26 
27  Data64bitsDirective = nullptr;
28  CommentString = "@";
29  Code16Directive = ".code\t16";
30  Code32Directive = ".code\t32";
32 
34 
35  // Exceptions handling
37 
39 }
40 
41 void ARMELFMCAsmInfo::anchor() { }
42 
44  if ((TheTriple.getArch() == Triple::armeb) ||
45  (TheTriple.getArch() == Triple::thumbeb))
46  IsLittleEndian = false;
47 
48  // ".comm align is in bytes but .align is pow-2."
49  AlignmentIsInBytes = false;
50 
51  Data64bitsDirective = nullptr;
52  CommentString = "@";
53  Code16Directive = ".code\t16";
54  Code32Directive = ".code\t32";
55 
57 
58  // Exceptions handling
59  switch (TheTriple.getOS()) {
60  case Triple::Bitrig:
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;
89 
90  PrivateGlobalPrefix = "$M";
91  PrivateLabelPrefix = "$M";
92 }
93 
94 void ARMCOFFMCAsmInfoGNU::anchor() { }
95 
97  AlignmentIsInBytes = false;
99 
100  CommentString = "@";
101  Code16Directive = ".code\t16";
102  Code32Directive = ".code\t32";
103  PrivateGlobalPrefix = ".L";
104  PrivateLabelPrefix = ".L";
105 
109 
110  UseIntegratedAssembler = false;
111  DwarfRegNumForCFI = true;
112 }
113 
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:273
const char * Code16Directive
These are assembly directives that tells the assembler to interpret the following instructions differ...
Definition: MCAsmInfo.h:147
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Definition: Triple.h:251
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:353
bool DwarfRegNumForCFI
True if dwarf register numbers are printed instead of symbolic register names in .cfi_* directives.
Definition: MCAsmInfo.h:336
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:191
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:72
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:221
const char * PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ...
Definition: MCAsmInfo.h:127
const char * Code32Directive
Definition: MCAsmInfo.h:148
const char * CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:113
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:242
ARMMCAsmInfoDarwin(const Triple &TheTriple)
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:318
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:321
bool UseDataRegionDirectives
This is true if data region markers should be printed as ".data_region/.end_data_region" directives...
Definition: MCAsmInfo.h:165
LLVM Value Representation.
Definition: Value.h:69
No exception support.
const char * PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:131
bool UseParensForSymbolVariant
True if target uses parens to indicate the symbol variant instead of
Definition: MCAsmInfo.h:340