X86MCTargetDesc.h revision 224145
1//===-- X86MCTargetDesc.h - X86 Target Descriptions -------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file provides X86 specific target descriptions.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef X86MCTARGETDESC_H
15#define X86MCTARGETDESC_H
16
17#include <string>
18
19namespace llvm {
20class MCSubtargetInfo;
21class Target;
22class StringRef;
23
24extern Target TheX86_32Target, TheX86_64Target;
25
26namespace X86_MC {
27  std::string ParseX86Triple(StringRef TT);
28
29  /// GetCpuIDAndInfo - Execute the specified cpuid and return the 4 values in
30  /// the specified arguments.  If we can't run cpuid on the host, return true.
31  bool GetCpuIDAndInfo(unsigned value, unsigned *rEAX,
32                       unsigned *rEBX, unsigned *rECX, unsigned *rEDX);
33
34  void DetectFamilyModel(unsigned EAX, unsigned &Family, unsigned &Model);
35
36  /// createARMMCSubtargetInfo - Create a X86 MCSubtargetInfo instance.
37  /// This is exposed so Asm parser, etc. do not need to go through
38  /// TargetRegistry.
39  MCSubtargetInfo *createX86MCSubtargetInfo(StringRef TT, StringRef CPU,
40                                            StringRef FS);
41}
42
43} // End llvm namespace
44
45
46// Defines symbolic names for X86 registers.  This defines a mapping from
47// register name to register number.
48//
49#define GET_REGINFO_ENUM
50#include "X86GenRegisterInfo.inc"
51
52// Defines symbolic names for the X86 instructions.
53//
54#define GET_INSTRINFO_ENUM
55#include "X86GenInstrInfo.inc"
56
57#define GET_SUBTARGETINFO_ENUM
58#include "X86GenSubtargetInfo.inc"
59
60#endif
61