LLVM  8.0.0svn
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 
17  CodePointerSize = (TT.getArch() == Triple::amdgcn) ? 8 : 4;
18  StackGrowsUp = true;
20  //===------------------------------------------------------------------===//
21  MinInstAlignment = 4;
22  MaxInstLength = (TT.getArch() == Triple::amdgcn) ? 8 : 16;
23  SeparatorString = "\n";
24  CommentString = ";";
25  PrivateLabelPrefix = "";
26  InlineAsmStart = ";#ASMSTART";
27  InlineAsmEnd = ";#ASMEND";
28 
29  //===--- Data Emission Directives -------------------------------------===//
32 
33  //===--- Global Variable Emission Directives --------------------------===//
36  HasNoDeadStrip = true;
37  WeakRefDirective = ".weakref\t";
38  //===--- Dwarf Emission Directives -----------------------------------===//
40 }
41 
43  return SectionName == ".hsatext" || SectionName == ".hsadata_global_agent" ||
44  SectionName == ".hsadata_global_program" ||
45  SectionName == ".hsarodata_readonly_agent" ||
47 }
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:283
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:132
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
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:110
bool HasNoDeadStrip
True if this target supports the MachO .no_dead_strip directive.
Definition: MCAsmInfo.h:291
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:114
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:221
bool HasAggressiveSymbolFolding
False if the assembler requires that we use.
Definition: MCAsmInfo.h:263
bool StackGrowsUp
True if target stack grow up. Default is false.
Definition: MCAsmInfo.h:73
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:216
virtual bool shouldOmitSectionDirective(StringRef SectionName) const
Return true if the .section directive should be omitted when emitting SectionName.
Definition: MCAsmInfo.cpp:119
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Definition: Triple.h:289
const char * InlineAsmStart
If these are nonempty, they contain a directive to emit before and after an inline assembly statement...
Definition: MCAsmInfo.h:142
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n)...
Definition: MCAsmInfo.h:267
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:332
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol...
Definition: MCAsmInfo.h:302
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
const char * InlineAsmEnd
Definition: MCAsmInfo.h:143
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:102
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:63
AMDGPUMCAsmInfo(const Triple &TT)
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
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