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:
|
77
|
22 const MCExpr *
|
|
23 getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding,
|
|
24 Mangler &Mang, 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.
|
77
|
30 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
|
|
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 {
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 /// \brief Describe a TLS variable address within debug info.
|
77
|
44 const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override;
|
|
45 };
|
|
46
|
95
|
47 /// X86LinuxNaClTargetObjectFile - This implementation is used for linux and
|
|
48 /// Native Client on x86 and x86-64.
|
|
49 class X86LinuxNaClTargetObjectFile : public X86ELFTargetObjectFile {
|
|
50 void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
|
|
51 };
|
|
52
|
77
|
53 /// \brief This implementation is used for Windows targets on x86 and x86-64.
|
|
54 class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
|
|
55 const MCExpr *
|
|
56 getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang,
|
|
57 const TargetMachine &TM) const override;
|
|
58
|
|
59 /// \brief Given a mergeable constant with the specified size and relocation
|
|
60 /// information, return a section that it should be placed in.
|
95
|
61 MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind,
|
|
62 const Constant *C) const override;
|
0
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
63 };
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
64
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
65 } // end namespace llvm
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
66
|
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
67 #endif
|