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 bool isValidUnquotedName(StringRef Name) const override;
32};
33
34struct X86_64MCAsmInfoDarwin : public X86MCAsmInfoDarwin {
35 explicit X86_64MCAsmInfoDarwin(const Triple &Triple,
36 const MCTargetOptions &Options);
37 const MCExpr *
38 getExprForPersonalitySymbol(const MCSymbol *Sym, unsigned Encoding,
39 MCStreamer &Streamer) const override;
40};
41
42class X86ELFMCAsmInfo : public MCAsmInfoELF {
43 void anchor() override;
44
45public:
46 explicit X86ELFMCAsmInfo(const Triple &Triple,
47 const MCTargetOptions &Options);
48 bool isValidUnquotedName(StringRef Name) const override;
49};
50
51class X86MCAsmInfoMicrosoft : public MCAsmInfoMicrosoft {
52 void anchor() override;
53
54public:
55 explicit X86MCAsmInfoMicrosoft(const Triple &Triple,
56 const MCTargetOptions &Options);
57 bool isValidUnquotedName(StringRef Name) const override;
58};
59
60class X86MCAsmInfoMicrosoftMASM : public X86MCAsmInfoMicrosoft {
61 void anchor() override;
62
63public:
64 explicit X86MCAsmInfoMicrosoftMASM(const Triple &Triple,
65 const MCTargetOptions &Options);
66};
67
68class X86MCAsmInfoGNUCOFF : public MCAsmInfoGNUCOFF {
69 void anchor() override;
70
71public:
72 explicit X86MCAsmInfoGNUCOFF(const Triple &Triple,
73 const MCTargetOptions &Options);
74 bool isValidUnquotedName(StringRef Name) const override;
75};
76
77namespace X86 {
78using Specifier = uint16_t;
79
80enum {
81 S_None,
82 S_COFF_SECREL,
83
84 S_ABS8 = MCSymbolRefExpr::FirstTargetSpecifier,
85 S_DTPOFF,
86 S_DTPREL,
87 S_GOT,
88 S_GOTENT,
89 S_GOTNTPOFF,
90 S_GOTOFF,
91 S_GOTPCREL,
92 S_GOTPCREL_NORELAX,
93 S_GOTREL,
94 S_GOTTPOFF,
95 S_INDNTPOFF,
96 S_NTPOFF,
97 S_PCREL,
98 S_PLT,
99 S_PLTOFF,
100 S_SIZE,
101 S_TLSCALL,
102 S_TLSDESC,
103 S_TLSGD,
104 S_TLSLD,
105 S_TLSLDM,
106 S_TLVP,
107 S_TLVPPAGE,
108 S_TLVPPAGEOFF,
109 S_TPOFF,
110};
111} // namespace X86
112} // namespace llvm
113
114#endif
115