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-exception
6//
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 {.Kind: HexagonMCExpr::VK_DTPREL, .Name: "DTPREL"}, {.Kind: HexagonMCExpr::VK_GD_GOT, .Name: "GDGOT"},
21 {.Kind: HexagonMCExpr::VK_GD_PLT, .Name: "GDPLT"}, {.Kind: HexagonMCExpr::VK_GOT, .Name: "GOT"},
22 {.Kind: HexagonMCExpr::VK_GOTREL, .Name: "GOTREL"}, {.Kind: HexagonMCExpr::VK_IE, .Name: "IE"},
23 {.Kind: HexagonMCExpr::VK_IE_GOT, .Name: "IEGOT"}, {.Kind: HexagonMCExpr::VK_LD_GOT, .Name: "LDGOT"},
24 {.Kind: HexagonMCExpr::VK_LD_PLT, .Name: "LDPLT"}, {.Kind: HexagonMCExpr::VK_PCREL, .Name: "PCREL"},
25 {.Kind: HexagonMCExpr::VK_PLT, .Name: "PLT"}, {.Kind: HexagonMCExpr::VK_TPREL, .Name: "TPREL"},
26};
27
28// Pin the vtable to this file.
29void HexagonMCAsmInfo::anchor() {}
30
31HexagonMCAsmInfo::HexagonMCAsmInfo(const Triple &TT,
32 const MCTargetOptions &Options)
33 : MCAsmInfoELF(Options) {
34 Data16bitsDirective = "\t.half\t";
35 Data32bitsDirective = "\t.word\t";
36 Data64bitsDirective = nullptr; // .xword is only supported by V9.
37 CommentString = "//";
38 SupportsDebugInformation = true;
39
40 LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
41 InlineAsmStart = "# InlineAsm Start";
42 InlineAsmEnd = "# InlineAsm End";
43 UsesSetToEquateSymbol = true;
44 ZeroDirective = "\t.space\t";
45 AscizDirective = "\t.string\t";
46
47 MinInstAlignment = 4;
48 UsesELFSectionDirectiveForBSS = true;
49 ExceptionsType = ExceptionHandling::DwarfCFI;
50 UseLogicalShr = false;
51
52 initializeAtSpecifiers(atSpecifiers);
53}
54