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"
18 #include "llvm/Target/ELFTargetAsmInfo.h"
19 #include "llvm/Target/DarwinTargetAsmInfo.h"
23 // Forward declaration.
24 class X86TargetMachine;
26 struct X86TargetAsmInfo : public virtual TargetAsmInfo {
27 explicit X86TargetAsmInfo(const X86TargetMachine &TM);
29 virtual bool ExpandInlineAsm(CallInst *CI) const;
32 bool LowerToBSwap(CallInst *CI) const;
35 struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo,
36 public DarwinTargetAsmInfo {
37 explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
38 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
42 struct X86ELFTargetAsmInfo : public X86TargetAsmInfo,
43 public ELFTargetAsmInfo {
44 explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
45 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
49 struct X86COFFTargetAsmInfo : public X86TargetAsmInfo {
50 explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM);
51 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
53 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
54 SectionKind::Kind kind) const;
55 virtual std::string printSectionFlags(unsigned flags) const;
57 const X86TargetMachine *X86TM;
60 struct X86WinTargetAsmInfo : public X86TargetAsmInfo {
61 explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);