2006-09-07 22:05:02 +00:00
|
|
|
//=====-- X86TargetAsmInfo.h - X86 asm properties -------------*- C++ -*--====//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2006-09-07 22:05:02 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the declaration of the X86TargetAsmInfo class.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef X86TARGETASMINFO_H
|
|
|
|
#define X86TARGETASMINFO_H
|
|
|
|
|
2008-09-25 21:00:33 +00:00
|
|
|
#include "X86TargetMachine.h"
|
2006-09-07 22:05:02 +00:00
|
|
|
#include "llvm/Target/TargetAsmInfo.h"
|
2009-07-27 16:45:59 +00:00
|
|
|
#include "llvm/Target/COFFTargetAsmInfo.h"
|
2008-07-19 13:15:21 +00:00
|
|
|
#include "llvm/Target/DarwinTargetAsmInfo.h"
|
2008-09-25 21:00:33 +00:00
|
|
|
#include "llvm/Support/Compiler.h"
|
2006-09-07 22:05:02 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2007-01-16 03:42:04 +00:00
|
|
|
|
2008-09-25 21:00:33 +00:00
|
|
|
extern const char *const x86_asm_table[];
|
2006-09-07 22:05:02 +00:00
|
|
|
|
2008-09-25 21:00:33 +00:00
|
|
|
template <class BaseTAI>
|
|
|
|
struct X86TargetAsmInfo : public BaseTAI {
|
2009-08-02 04:27:24 +00:00
|
|
|
explicit X86TargetAsmInfo(const TargetMachine &TM) {
|
2008-09-25 21:00:33 +00:00
|
|
|
BaseTAI::AsmTransCBE = x86_asm_table;
|
2009-07-20 17:59:32 +00:00
|
|
|
BaseTAI::AssemblerDialect =TM.getSubtarget<X86Subtarget>().getAsmFlavor();
|
2008-09-25 21:00:33 +00:00
|
|
|
}
|
2008-07-09 13:20:48 +00:00
|
|
|
};
|
|
|
|
|
2008-09-25 21:00:33 +00:00
|
|
|
EXTERN_TEMPLATE_INSTANTIATION(class X86TargetAsmInfo<TargetAsmInfo>);
|
|
|
|
|
|
|
|
struct X86DarwinTargetAsmInfo : public X86TargetAsmInfo<DarwinTargetAsmInfo> {
|
2008-07-09 13:20:48 +00:00
|
|
|
explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
|
|
|
|
};
|
|
|
|
|
2009-08-02 04:27:24 +00:00
|
|
|
struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> {
|
2008-07-09 13:20:48 +00:00
|
|
|
explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
|
|
|
|
};
|
|
|
|
|
2009-08-02 04:02:52 +00:00
|
|
|
typedef X86TargetAsmInfo<COFFTargetAsmInfo> X86COFFTargetAsmInfo;
|
2008-07-09 13:20:48 +00:00
|
|
|
|
2009-07-28 03:13:23 +00:00
|
|
|
struct X86WinTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> {
|
2008-07-09 13:20:48 +00:00
|
|
|
explicit X86WinTargetAsmInfo(const X86TargetMachine &TM);
|
2006-09-07 22:05:02 +00:00
|
|
|
};
|
2008-09-25 21:00:33 +00:00
|
|
|
|
2006-09-07 22:05:02 +00:00
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif
|