52 lines · cpp
1//===-- HexagonMCAsmInfo.cpp - Hexagon asm properties ---------------------===//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-exception6//7//===----------------------------------------------------------------------===//8//9// This file contains the declarations of the HexagonMCAsmInfo properties.10//11//===----------------------------------------------------------------------===//12 13#include "HexagonMCAsmInfo.h"14#include "MCTargetDesc/HexagonMCExpr.h"15#include "llvm/MC/MCExpr.h"16 17using namespace llvm;18 19const MCAsmInfo::AtSpecifier atSpecifiers[] = {20 {HexagonMCExpr::VK_DTPREL, "DTPREL"}, {HexagonMCExpr::VK_GD_GOT, "GDGOT"},21 {HexagonMCExpr::VK_GD_PLT, "GDPLT"}, {HexagonMCExpr::VK_GOT, "GOT"},22 {HexagonMCExpr::VK_GOTREL, "GOTREL"}, {HexagonMCExpr::VK_IE, "IE"},23 {HexagonMCExpr::VK_IE_GOT, "IEGOT"}, {HexagonMCExpr::VK_LD_GOT, "LDGOT"},24 {HexagonMCExpr::VK_LD_PLT, "LDPLT"}, {HexagonMCExpr::VK_PCREL, "PCREL"},25 {HexagonMCExpr::VK_PLT, "PLT"}, {HexagonMCExpr::VK_TPREL, "TPREL"},26};27 28// Pin the vtable to this file.29void HexagonMCAsmInfo::anchor() {}30 31HexagonMCAsmInfo::HexagonMCAsmInfo(const Triple &TT) {32 Data16bitsDirective = "\t.half\t";33 Data32bitsDirective = "\t.word\t";34 Data64bitsDirective = nullptr; // .xword is only supported by V9.35 CommentString = "//";36 SupportsDebugInformation = true;37 38 LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;39 InlineAsmStart = "# InlineAsm Start";40 InlineAsmEnd = "# InlineAsm End";41 UsesSetToEquateSymbol = true;42 ZeroDirective = "\t.space\t";43 AscizDirective = "\t.string\t";44 45 MinInstAlignment = 4;46 UsesELFSectionDirectiveForBSS = true;47 ExceptionsType = ExceptionHandling::DwarfCFI;48 UseLogicalShr = false;49 50 initializeAtSpecifiers(atSpecifiers);51}52