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 "X86TargetMachine.h"
18 #include "llvm/Target/TargetAsmInfo.h"
19 #include "llvm/Target/COFFTargetAsmInfo.h"
20 #include "llvm/Target/DarwinTargetAsmInfo.h"
21 #include "llvm/Target/ELFTargetAsmInfo.h"
22 #include "llvm/Support/Compiler.h"
26 extern const char *const x86_asm_table[];
28 template <class BaseTAI>
29 struct X86TargetAsmInfo : public BaseTAI {
30 explicit X86TargetAsmInfo(const X86TargetMachine &TM) : BaseTAI(TM) {
31 BaseTAI::AsmTransCBE = x86_asm_table;
32 BaseTAI::AssemblerDialect =TM.getSubtarget<X86Subtarget>().getAsmFlavor();
36 EXTERN_TEMPLATE_INSTANTIATION(class X86TargetAsmInfo<TargetAsmInfo>);
38 struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo<DarwinTargetAsmInfo> {
39 explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
40 virtual const char *getEHGlobalPrefix() const;
43 struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<ELFTargetAsmInfo> {
44 explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
47 typedef X86TargetAsmInfo<COFFTargetAsmInfo> X86COFFTargetAsmInfo;
49 struct X86WinTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> {
50 explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);