blob: 0789bd8e389d77f6628c8f1ba0adf73dbf22a60a [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//=====-- X86TargetAsmInfo.h - X86 asm properties -------------*- C++ -*--====//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file contains the declaration of the X86TargetAsmInfo class.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef X86TARGETASMINFO_H
15#define X86TARGETASMINFO_H
16
17#include "llvm/Target/TargetAsmInfo.h"
18
19namespace llvm {
20
21 // Forward declaration.
22 class X86TargetMachine;
23
24 struct X86TargetAsmInfo : public TargetAsmInfo {
Dan Gohmancdd820b2007-09-25 20:27:06 +000025 explicit X86TargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikov8bf5d342008-07-09 13:19:08 +000026
Dan Gohmanf17a25c2007-07-18 16:29:46 +000027 virtual bool ExpandInlineAsm(CallInst *CI) const;
Anton Korobeynikov8bf5d342008-07-09 13:19:08 +000028 virtual std::string SectionForGlobal(const GlobalValue *GV) const;
Anton Korobeynikov2c8d0662008-07-09 13:20:07 +000029 virtual std::string PrintSectionFlags(unsigned flags) const;
Anton Korobeynikov65c0d872008-02-27 23:33:50 +000030
Dan Gohmanf17a25c2007-07-18 16:29:46 +000031 private:
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032 bool LowerToBSwap(CallInst *CI) const;
Anton Korobeynikovf700e682008-07-09 13:20:48 +000033 protected:
34 const X86TargetMachine* X86TM;
35 };
36
37 struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo {
38 explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikovcd2a4e52008-07-09 13:21:08 +000039 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
40 bool Global) const;
Anton Korobeynikov52069b52008-07-09 13:21:29 +000041 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
42 SectionKind::Kind kind) const;
Anton Korobeynikovf700e682008-07-09 13:20:48 +000043 };
44
45 struct X86ELFTargetAsmInfo : public X86TargetAsmInfo {
46 explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikovcd2a4e52008-07-09 13:21:08 +000047 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
48 bool Global) const;
Anton Korobeynikovf700e682008-07-09 13:20:48 +000049 };
50
51 struct X86COFFTargetAsmInfo : public X86TargetAsmInfo {
52 explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikovcd2a4e52008-07-09 13:21:08 +000053 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
54 bool Global) const;
Anton Korobeynikov52069b52008-07-09 13:21:29 +000055 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
56 SectionKind::Kind kind) const;
Anton Korobeynikovf700e682008-07-09 13:20:48 +000057 };
58
59 struct X86WinTargetAsmInfo : public X86TargetAsmInfo {
60 explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);
Dan Gohmanf17a25c2007-07-18 16:29:46 +000061 };
62} // namespace llvm
63
64#endif