LLVM  4.0.0
AMDGPUMCAsmInfo.cpp
Go to the documentation of this file.
1 //===-- MCTargetDesc/AMDGPUMCAsmInfo.cpp - Assembly Info ------------------===//
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 /// \file
9 //===----------------------------------------------------------------------===//
10 
11 #include "AMDGPUMCAsmInfo.h"
12 #include "llvm/ADT/Triple.h"
13 
14 using namespace llvm;
15 
18  //===------------------------------------------------------------------===//
19  MinInstAlignment = 4;
20  MaxInstLength = (TT.getArch() == Triple::amdgcn) ? 8 : 16;
21  SeparatorString = "\n";
22  CommentString = ";";
23  PrivateLabelPrefix = "";
24  InlineAsmStart = ";#ASMSTART";
25  InlineAsmEnd = ";#ASMEND";
26 
27  //===--- Data Emission Directives -------------------------------------===//
30 
31  //===--- Global Variable Emission Directives --------------------------===//
34  HasNoDeadStrip = true;
35  WeakRefDirective = ".weakref\t";
36  //===--- Dwarf Emission Directives -----------------------------------===//
38 }
39 
41  return SectionName == ".hsatext" || SectionName == ".hsadata_global_agent" ||
42  SectionName == ".hsadata_global_program" ||
43  SectionName == ".hsarodata_readonly_agent" ||
45 }
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:274
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:124
bool shouldOmitSectionDirective(StringRef SectionName) const override
Return true if the .section directive should be omitted when emitting SectionName.
const char * SeparatorString
This string, if specified, is used to separate instructions from each other when on the same line...
Definition: MCAsmInfo.h:102
bool HasNoDeadStrip
True if this target supports the MachO .no_dead_strip directive.
Definition: MCAsmInfo.h:282
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:106
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:212
bool HasAggressiveSymbolFolding
False if the assembler requires that we use.
Definition: MCAsmInfo.h:254
bool SunStyleELFSectionSwitchSyntax
This is true if this target uses "Sun Style" syntax for section switching ("#alloc,#write" etc) instead of the normal ELF syntax (,"a,w") in .section directives.
Definition: MCAsmInfo.h:207
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:270
virtual bool shouldOmitSectionDirective(StringRef SectionName) const
Return true if the .section directive should be omitted when emitting SectionName.
Definition: MCAsmInfo.cpp:162
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Definition: MCAsmInfo.h:134
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n)...
Definition: MCAsmInfo.h:258
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:323
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol...
Definition: MCAsmInfo.h:293
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
const char * InlineAsmEnd
Definition: MCAsmInfo.h:135
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:94
const char SectionName[]
Definition: AMDGPUPTNote.h:24
AMDGPUMCAsmInfo(const Triple &TT)
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:47
unsigned MaxInstLength
This is the maximum possible length of an instruction, which is needed to compute the size of an inli...
Definition: MCAsmInfo.h:90