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
14using namespace llvm;
15
16AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(const Triple &TT) : MCAsmInfoELF() {
17  HasSingleParameterDotFile = false;
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 -------------------------------------===//
28  SunStyleELFSectionSwitchSyntax = true;
29  UsesELFSectionDirectiveForBSS = true;
30
31  //===--- Global Variable Emission Directives --------------------------===//
32  HasAggressiveSymbolFolding = true;
33  COMMDirectiveAlignmentIsInBytes = false;
34  HasNoDeadStrip = true;
35  WeakRefDirective = ".weakref\t";
36  //===--- Dwarf Emission Directives -----------------------------------===//
37  SupportsDebugInformation = true;
38}
39
40bool AMDGPUMCAsmInfo::shouldOmitSectionDirective(StringRef SectionName) const {
41  return SectionName == ".hsatext" || SectionName == ".hsadata_global_agent" ||
42         SectionName == ".hsadata_global_program" ||
43         SectionName == ".hsarodata_readonly_agent" ||
44         MCAsmInfo::shouldOmitSectionDirective(SectionName);
45}
46