1 //===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
3 // This file contains the entry points for global functions defined in the x86
4 // target library, as used by the LLVM JIT.
6 //===----------------------------------------------------------------------===//
15 /// createSimpleX86InstructionSelector - This pass converts an LLVM function
16 /// into a machine code representation is a very simple peep-hole fashion. The
17 /// generated code sucks but the implementation is nice and simple.
19 Pass *createSimpleX86InstructionSelector(TargetMachine &TM);
21 /// createX86PeepholeOptimizer - Create a pass to perform X86 specific peephole
24 Pass *createX86PeepholeOptimizerPass();
26 /// createX86FloatingPointStackifierPass - This function returns a pass which
27 /// converts floating point register references and pseudo instructions into
28 /// floating point stack references and physical instructions.
30 Pass *createX86FloatingPointStackifierPass();
32 /// createX86CodePrinterPass - Print out the specified machine code function to
33 /// the specified stream. This function should work regardless of whether or
34 /// not the function is in SSA form or not.
36 Pass *createX86CodePrinterPass(std::ostream &O);
38 /// X86EmitCodeToMemory - This function converts a register allocated function
39 /// into raw machine code in a dynamically allocated chunk of memory. A pointer
40 /// to the start of the function is returned.
42 Pass *createEmitX86CodeToMemory();
44 // Put symbolic names in a namespace to avoid causing these to clash with all
45 // kinds of other things...
48 // Defines a large number of symbolic names for X86 registers. This defines a
49 // mapping from register name to register number.
52 #define R(ENUM, NAME, FLAGS, TSFLAGS, ALIAS_SET) ENUM,
53 #include "X86RegisterInfo.def"
56 // This defines a large number of symbolic names for X86 instruction opcodes.
58 #define I(ENUM, NAME, BASEOPCODE, FLAGS, TSFLAGS, IMPDEFS, IMPUSES) ENUM,
59 #include "X86InstrInfo.def"