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