2012-12-12 05:25:42 +08:00
|
|
|
//===-- MCTargetDesc/AMDGPUMCAsmInfo.cpp - Assembly Info ------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
/// \file
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "AMDGPUMCAsmInfo.h"
|
2016-06-17 05:14:05 +08:00
|
|
|
#include "llvm/ADT/Triple.h"
|
2012-12-12 05:25:42 +08:00
|
|
|
|
|
|
|
using namespace llvm;
|
2016-06-17 05:14:05 +08:00
|
|
|
|
2015-09-16 00:17:27 +08:00
|
|
|
AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(const Triple &TT) : MCAsmInfoELF() {
|
2017-04-18 02:02:09 +08:00
|
|
|
CodePointerSize = (TT.getArch() == Triple::amdgcn) ? 8 : 4;
|
2017-04-25 03:40:51 +08:00
|
|
|
StackGrowsUp = true;
|
2012-12-12 05:25:42 +08:00
|
|
|
HasSingleParameterDotFile = false;
|
|
|
|
//===------------------------------------------------------------------===//
|
2016-06-28 05:42:49 +08:00
|
|
|
MinInstAlignment = 4;
|
2016-06-17 05:14:05 +08:00
|
|
|
MaxInstLength = (TT.getArch() == Triple::amdgcn) ? 8 : 16;
|
2012-12-12 05:25:42 +08:00
|
|
|
SeparatorString = "\n";
|
|
|
|
CommentString = ";";
|
2014-12-04 08:06:57 +08:00
|
|
|
PrivateLabelPrefix = "";
|
2012-12-12 05:25:42 +08:00
|
|
|
InlineAsmStart = ";#ASMSTART";
|
|
|
|
InlineAsmEnd = ";#ASMEND";
|
|
|
|
|
|
|
|
//===--- Data Emission Directives -------------------------------------===//
|
|
|
|
SunStyleELFSectionSwitchSyntax = true;
|
|
|
|
UsesELFSectionDirectiveForBSS = true;
|
|
|
|
|
|
|
|
//===--- Global Variable Emission Directives --------------------------===//
|
|
|
|
HasAggressiveSymbolFolding = true;
|
|
|
|
COMMDirectiveAlignmentIsInBytes = false;
|
|
|
|
HasNoDeadStrip = true;
|
|
|
|
WeakRefDirective = ".weakref\t";
|
|
|
|
//===--- Dwarf Emission Directives -----------------------------------===//
|
|
|
|
SupportsDebugInformation = true;
|
|
|
|
}
|
2015-09-26 05:41:28 +08:00
|
|
|
|
|
|
|
bool AMDGPUMCAsmInfo::shouldOmitSectionDirective(StringRef SectionName) const {
|
2015-12-03 03:47:57 +08:00
|
|
|
return SectionName == ".hsatext" || SectionName == ".hsadata_global_agent" ||
|
|
|
|
SectionName == ".hsadata_global_program" ||
|
2015-12-03 11:34:32 +08:00
|
|
|
SectionName == ".hsarodata_readonly_agent" ||
|
2015-09-26 05:41:28 +08:00
|
|
|
MCAsmInfo::shouldOmitSectionDirective(SectionName);
|
|
|
|
}
|