1//===-- X86MCAsmInfo.h - X86 asm properties --------------------*- C++ -*--===//
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 declaration of the X86MCAsmInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCASMINFO_H
14#define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86MCASMINFO_H
15
16#include "MCTargetDesc/X86MCExpr.h"
17#include "llvm/MC/MCAsmInfoCOFF.h"
18#include "llvm/MC/MCAsmInfoDarwin.h"
19#include "llvm/MC/MCAsmInfoELF.h"
20#include "llvm/MC/MCExpr.h"
21
22namespace llvm {
23class Triple;
24
25class X86MCAsmInfoDarwin : public MCAsmInfoDarwin {
26 virtual void anchor();
27
28public:
29 explicit X86MCAsmInfoDarwin(const Triple &Triple,
30 const MCTargetOptions &Options);
31};
32
33struct X86_64MCAsmInfoDarwin : public X86MCAsmInfoDarwin {
34 explicit X86_64MCAsmInfoDarwin(const Triple &Triple,
35 const MCTargetOptions &Options);
36 const MCExpr *
37 getExprForPersonalitySymbol(const MCSymbol *Sym, unsigned Encoding,
38 MCStreamer &Streamer) const override;
39};
40
41class X86ELFMCAsmInfo : public MCAsmInfoELF {
42 void anchor() override;
43
44public:
45 explicit X86ELFMCAsmInfo(const Triple &Triple,
46 const MCTargetOptions &Options);
47};
48
49class X86MCAsmInfoMicrosoft : public MCAsmInfoMicrosoft {
50 void anchor() override;
51
52public:
53 explicit X86MCAsmInfoMicrosoft(const Triple &Triple,
54 const MCTargetOptions &Options);
55};
56
57class X86MCAsmInfoMicrosoftMASM : public X86MCAsmInfoMicrosoft {
58 void anchor() override;
59
60public:
61 explicit X86MCAsmInfoMicrosoftMASM(const Triple &Triple,
62 const MCTargetOptions &Options);
63};
64
65class X86MCAsmInfoGNUCOFF : public MCAsmInfoGNUCOFF {
66 void anchor() override;
67
68public:
69 explicit X86MCAsmInfoGNUCOFF(const Triple &Triple,
70 const MCTargetOptions &Options);
71};
72
73namespace X86 {
74using Specifier = uint16_t;
75
76enum {
77 S_None,
78 S_COFF_SECREL,
79
80 S_ABS8 = MCSymbolRefExpr::FirstTargetSpecifier,
81 S_DTPOFF,
82 S_DTPREL,
83 S_GOT,
84 S_GOTENT,
85 S_GOTNTPOFF,
86 S_GOTOFF,
87 S_GOTPCREL,
88 S_GOTPCREL_NORELAX,
89 S_GOTREL,
90 S_GOTTPOFF,
91 S_INDNTPOFF,
92 S_NTPOFF,
93 S_PCREL,
94 S_PLT,
95 S_PLTOFF,
96 S_SIZE,
97 S_TLSCALL,
98 S_TLSDESC,
99 S_TLSGD,
100 S_TLSLD,
101 S_TLSLDM,
102 S_TLVP,
103 S_TLVPPAGE,
104 S_TLVPPAGEOFF,
105 S_TPOFF,
106};
107} // namespace X86
108} // namespace llvm
109
110#endif
111