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