LLVM  9.0.0svn
Go to the documentation of this file.
1 //===-- MCTargetDesc/AMDGPUMCAsmInfo.cpp - Assembly Info ------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 /// \file
8 //===----------------------------------------------------------------------===//
10 #include "AMDGPUMCAsmInfo.h"
11 #include "llvm/ADT/Triple.h"
13 using namespace llvm;
16  CodePointerSize = (TT.getArch() == Triple::amdgcn) ? 8 : 4;
17  StackGrowsUp = true;
19  //===------------------------------------------------------------------===//
20  MinInstAlignment = 4;
21  MaxInstLength = (TT.getArch() == Triple::amdgcn) ? 8 : 16;
22  SeparatorString = "\n";
23  CommentString = ";";
24  PrivateLabelPrefix = "";
25  InlineAsmStart = ";#ASMSTART";
26  InlineAsmEnd = ";#ASMEND";
28  //===--- Data Emission Directives -------------------------------------===//
32  //===--- Global Variable Emission Directives --------------------------===//
35  HasNoDeadStrip = true;
36  WeakRefDirective = ".weakref\t";
37  //===--- Dwarf Emission Directives -----------------------------------===//
39 }
42  return SectionName == ".hsatext" || SectionName == ".hsadata_global_agent" ||
43  SectionName == ".hsadata_global_program" ||
44  SectionName == ".hsarodata_readonly_agent" ||
46 }
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:282
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks.
Definition: MCAsmInfo.h:131
This class represents lattice values for constants.
Definition: AllocatorList.h:23
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:109
bool HasNoDeadStrip
True if this target supports the MachO .no_dead_strip directive.
Definition: MCAsmInfo.h:290
StringRef CommentString
This indicates the comment character used by the assembler.
Definition: MCAsmInfo.h:113
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:220
bool HasAggressiveSymbolFolding
False if the assembler requires that we use.
Definition: MCAsmInfo.h:262
bool StackGrowsUp
True if target stack grow up. Default is false.
Definition: MCAsmInfo.h:72
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:215
virtual bool shouldOmitSectionDirective(StringRef SectionName) const
Return true if the .section directive should be omitted when emitting SectionName.
Definition: MCAsmInfo.cpp:118
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:141
bool COMMDirectiveAlignmentIsInBytes
True is .comm's and .lcomms optional alignment is to be specified in bytes instead of log2(n)...
Definition: MCAsmInfo.h:266
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:331
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol...
Definition: MCAsmInfo.h:301
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
const char * InlineAsmEnd
Definition: MCAsmInfo.h:142
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:101
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:62
AMDGPUMCAsmInfo(const Triple &TT)
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
unsigned MaxInstLength
This is the maximum possible length of an instruction, which is needed to compute the size of an inli...
Definition: MCAsmInfo.h:97