blob: 045db7aa057cf23743228dd6f08f57273e6c9a4c [file] [log] [blame]
Jim Laskey0e835412006-09-07 22:05:02 +00001//=====-- X86TargetAsmInfo.h - X86 asm properties -------------*- C++ -*--====//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnerf3ebc3f2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Jim Laskey0e835412006-09-07 22:05:02 +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 {
Bill Wendlinge21237e2007-01-16 03:42:04 +000020
Jim Laskey0e835412006-09-07 22:05:02 +000021 // Forward declaration.
22 class X86TargetMachine;
23
24 struct X86TargetAsmInfo : public TargetAsmInfo {
Dan Gohman57211c52007-09-25 20:27:06 +000025 explicit X86TargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikov768019872008-07-09 13:19:08 +000026
Chris Lattner0fc6ae02006-11-29 01:14:06 +000027 virtual bool ExpandInlineAsm(CallInst *CI) const;
Anton Korobeynikov768019872008-07-09 13:19:08 +000028 virtual std::string SectionForGlobal(const GlobalValue *GV) const;
Anton Korobeynikovab778022008-07-09 13:19:38 +000029 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
30 SectionKind::Kind kind) const;
Anton Korobeynikov2633a042008-07-09 13:20:07 +000031 virtual std::string PrintSectionFlags(unsigned flags) const;
Anton Korobeynikovae24cca2008-02-27 23:33:50 +000032
Chris Lattner0fc6ae02006-11-29 01:14:06 +000033 private:
34 bool LowerToBSwap(CallInst *CI) const;
Anton Korobeynikov9a6ed372008-07-09 13:20:48 +000035 protected:
36 const X86TargetMachine* X86TM;
37 };
38
39 struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo {
40 explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikovd947aa82008-07-09 13:21:08 +000041 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
42 bool Global) const;
Anton Korobeynikov9a6ed372008-07-09 13:20:48 +000043 };
44
45 struct X86ELFTargetAsmInfo : public X86TargetAsmInfo {
46 explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikovd947aa82008-07-09 13:21:08 +000047 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
48 bool Global) const;
Anton Korobeynikov9a6ed372008-07-09 13:20:48 +000049 };
50
51 struct X86COFFTargetAsmInfo : public X86TargetAsmInfo {
52 explicit X86COFFTargetAsmInfo(const X86TargetMachine &TM);
Anton Korobeynikovd947aa82008-07-09 13:21:08 +000053 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
54 bool Global) const;
Anton Korobeynikov9a6ed372008-07-09 13:20:48 +000055 };
56
57 struct X86WinTargetAsmInfo : public X86TargetAsmInfo {
58 explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);
Jim Laskey0e835412006-09-07 22:05:02 +000059 };
Jim Laskey0e835412006-09-07 22:05:02 +000060} // namespace llvm
61
62#endif