annotate lib/Target/X86/X86TargetObjectFile.h @ 128:c347d3398279 default tip

fix
author mir3636
date Wed, 06 Dec 2017 14:37:17 +0900
parents 803732b1fca8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 //===-- X86TargetObjectFile.h - X86 Object Info -----------------*- C++ -*-===//
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // The LLVM Compiler Infrastructure
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 //
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // This file is distributed under the University of Illinois Open Source
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 // License. See LICENSE.TXT for details.
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 //
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 //===----------------------------------------------------------------------===//
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
10 #ifndef LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
11 #define LLVM_LIB_TARGET_X86_X86TARGETOBJECTFILE_H
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 #include "llvm/Target/TargetLoweringObjectFile.h"
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 namespace llvm {
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 /// X86_64MachoTargetObjectFile - This TLOF implementation is used for Darwin
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 /// x86-64.
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 public:
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
22 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
23 unsigned Encoding,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
24 const TargetMachine &TM,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
25 MachineModuleInfo *MMI,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
26 MCStreamer &Streamer) const override;
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 // getCFIPersonalitySymbol - The symbol that gets passed to
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 // .cfi_personality.
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
30 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
31 const TargetMachine &TM,
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
32 MachineModuleInfo *MMI) const override;
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
33
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
34 const MCExpr *getIndirectSymViaGOTPCRel(const MCSymbol *Sym,
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
35 const MCValue &MV, int64_t Offset,
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
36 MachineModuleInfo *MMI,
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
37 MCStreamer &Streamer) const override;
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 };
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
40 /// \brief This implemenatation is used for X86 ELF targets that don't
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
41 /// have a further specialization.
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
42 class X86ELFTargetObjectFile : public TargetLoweringObjectFileELF {
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
43 public:
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
44 X86ELFTargetObjectFile() {
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
45 PLTRelativeVariantKind = MCSymbolRefExpr::VK_PLT;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
46 }
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
47
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 /// \brief Describe a TLS variable address within debug info.
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
49 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
50 };
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
51
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
52 /// X86FreeBSDTargetObjectFile - This implementation is used for FreeBSD
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
53 /// on x86 and x86-64.
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
54 class X86FreeBSDTargetObjectFile : public X86ELFTargetObjectFile {
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
55 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
56 };
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
57
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
58 /// \brief This implementation is used for Fuchsia on x86-64.
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
59 class X86FuchsiaTargetObjectFile : public X86ELFTargetObjectFile {
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
60 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
61 };
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
62
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
63 /// X86LinuxNaClTargetObjectFile - This implementation is used for linux and
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
64 /// Native Client on x86 and x86-64.
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
65 class X86LinuxNaClTargetObjectFile : public X86ELFTargetObjectFile {
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
66 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
67 };
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
68
121
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
69 /// \brief This implementation is used for Solaris on x86/x86-64.
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
70 class X86SolarisTargetObjectFile : public X86ELFTargetObjectFile {
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
71 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
72 };
803732b1fca8 LLVM 5.0
kono
parents: 120
diff changeset
73
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
74 /// \brief This implementation is used for Windows targets on x86 and x86-64.
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
75 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
76 const MCExpr *
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
77 lowerRelativeReference(const GlobalValue *LHS, const GlobalValue *RHS,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
78 const TargetMachine &TM) const override;
77
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
79
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
80 /// \brief Given a mergeable constant with the specified size and relocation
54457678186b LLVM 3.6
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
81 /// information, return a section that it should be placed in.
95
afa8332a0e37 LLVM 3.8
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 77
diff changeset
82 MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
120
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
83 const Constant *C,
1172e4bd9c6f update 4.0.0
mir3636
parents: 95
diff changeset
84 unsigned &Align) const override;
0
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 };
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 } // end namespace llvm
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
95c75e76d11b LLVM 3.4
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 #endif