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 | |
17 | using namespace llvm; |
18 | |
19 | const 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. |
29 | void HexagonMCAsmInfo::anchor() {} |
30 | |
31 | HexagonMCAsmInfo::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 | |