1 //=====-- X86TargetAsmInfo.h - X86 asm properties -------------*- C++ -*--====//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains the declaration of the X86TargetAsmInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef X86TARGETASMINFO_H
15 #define X86TARGETASMINFO_H
17 #include "llvm/Target/TargetAsmInfo.h"
21 // Forward declaration.
22 class X86TargetMachine;
25 struct X86TargetAsmInfo : public TargetAsmInfo {
26 explicit X86TargetAsmInfo(const X86TargetMachine &TM);
28 virtual bool ExpandInlineAsm(CallInst *CI) const;
31 bool LowerToBSwap(CallInst *CI) const;
33 const X86TargetMachine* X86TM;
36 struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo {
37 explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
38 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
40 virtual std::string SelectSectionForGlobal(const GlobalValue *GV) const;
41 virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV,
42 const char* name) const;
43 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
44 SectionKind::Kind kind) const;
45 std::string MergeableConstSection(const GlobalVariable *GV) const;
46 std::string MergeableStringSection(const GlobalVariable *GV) const;
49 struct X86ELFTargetAsmInfo : public X86TargetAsmInfo {
50 explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
51 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
54 virtual std::string SelectSectionForGlobal(const GlobalValue *GV) const;
55 virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV,
56 const char* name) const;
57 virtual std::string PrintSectionFlags(unsigned flags) const;
58 std::string MergeableConstSection(const GlobalVariable *GV) const;
59 std::string MergeableStringSection(const GlobalVariable *GV) const;
62 struct X86COFFTargetAsmInfo : public X86TargetAsmInfo {
63 explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM);
64 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
66 virtual unsigned SectionFlagsForGlobal(const GlobalValue *GV,
67 const char* name) const;
68 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
69 SectionKind::Kind kind) const;
70 virtual std::string PrintSectionFlags(unsigned flags) const;
73 struct X86WinTargetAsmInfo : public X86TargetAsmInfo {
74 explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);