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