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