2002-10-25 22:55:53 +00:00
|
|
|
//===-- X86.h - Top-level interface for X86 representation ------*- C++ -*-===//
|
2005-04-21 23:38:14 +00:00
|
|
|
//
|
2003-10-21 15:17:13 +00:00
|
|
|
// 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.
|
2005-04-21 23:38:14 +00:00
|
|
|
//
|
2003-10-21 15:17:13 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2002-10-25 22:55:53 +00:00
|
|
|
//
|
|
|
|
// This file contains the entry points for global functions defined in the x86
|
|
|
|
// target library, as used by the LLVM JIT.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef TARGET_X86_H
|
|
|
|
#define TARGET_X86_H
|
|
|
|
|
2011-06-28 20:07:07 +00:00
|
|
|
#include "MCTargetDesc/X86TargetDesc.h"
|
2010-12-20 15:45:51 +00:00
|
|
|
#include "llvm/Support/DataTypes.h"
|
2009-04-29 23:29:43 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-08-13 18:15:29 +00:00
|
|
|
class FunctionPass;
|
2010-02-21 21:54:14 +00:00
|
|
|
class JITCodeEmitter;
|
2009-08-27 08:12:55 +00:00
|
|
|
class MCCodeEmitter;
|
2010-02-12 23:12:47 +00:00
|
|
|
class MCContext;
|
2010-12-20 15:07:39 +00:00
|
|
|
class MCObjectWriter;
|
2010-02-21 21:54:14 +00:00
|
|
|
class MachineCodeEmitter;
|
2009-08-27 08:12:55 +00:00
|
|
|
class Target;
|
2010-02-21 21:54:14 +00:00
|
|
|
class TargetAsmBackend;
|
|
|
|
class X86TargetMachine;
|
2009-07-14 20:18:05 +00:00
|
|
|
class formatted_raw_ostream;
|
2010-12-20 15:07:39 +00:00
|
|
|
class raw_ostream;
|
2002-10-25 22:55:53 +00:00
|
|
|
|
2005-11-15 00:40:23 +00:00
|
|
|
/// createX86ISelDag - This pass converts a legalized DAG into a
|
|
|
|
/// X86-specific DAG, ready for instruction scheduling.
|
|
|
|
///
|
2009-06-01 19:57:37 +00:00
|
|
|
FunctionPass *createX86ISelDag(X86TargetMachine &TM,
|
|
|
|
CodeGenOpt::Level OptLevel);
|
2005-01-07 07:48:33 +00:00
|
|
|
|
2010-07-10 09:00:22 +00:00
|
|
|
/// createGlobalBaseRegPass - This pass initializes a global base
|
|
|
|
/// register for PIC on x86-32.
|
|
|
|
FunctionPass* createGlobalBaseRegPass();
|
|
|
|
|
2003-01-13 00:45:29 +00:00
|
|
|
/// createX86FloatingPointStackifierPass - This function returns a pass which
|
|
|
|
/// converts floating point register references and pseudo instructions into
|
|
|
|
/// floating point stack references and physical instructions.
|
2002-12-28 20:26:16 +00:00
|
|
|
///
|
2003-08-13 18:15:29 +00:00
|
|
|
FunctionPass *createX86FloatingPointStackifierPass();
|
2002-10-29 22:37:54 +00:00
|
|
|
|
2010-03-25 17:25:00 +00:00
|
|
|
/// createSSEDomainFixPass - This pass twiddles SSE opcodes to prevent domain
|
|
|
|
/// crossings.
|
|
|
|
FunctionPass *createSSEDomainFixPass();
|
|
|
|
|
2005-07-11 05:17:48 +00:00
|
|
|
/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
|
|
|
|
/// to the specified MCE object.
|
2009-06-01 19:57:37 +00:00
|
|
|
FunctionPass *createX86JITCodeEmitterPass(X86TargetMachine &TM,
|
|
|
|
JITCodeEmitter &JCE);
|
2005-07-11 05:17:48 +00:00
|
|
|
|
2010-02-12 23:12:47 +00:00
|
|
|
MCCodeEmitter *createX86_32MCCodeEmitter(const Target &, TargetMachine &TM,
|
|
|
|
MCContext &Ctx);
|
|
|
|
MCCodeEmitter *createX86_64MCCodeEmitter(const Target &, TargetMachine &TM,
|
|
|
|
MCContext &Ctx);
|
2009-08-27 08:12:55 +00:00
|
|
|
|
2010-03-11 01:34:16 +00:00
|
|
|
TargetAsmBackend *createX86_32AsmBackend(const Target &, const std::string &);
|
|
|
|
TargetAsmBackend *createX86_64AsmBackend(const Target &, const std::string &);
|
2010-02-21 21:54:14 +00:00
|
|
|
|
2003-08-13 18:15:29 +00:00
|
|
|
/// createX86EmitCodeToMemory - Returns a pass that converts a register
|
|
|
|
/// allocated function into raw machine code in a dynamically
|
|
|
|
/// allocated chunk of memory.
|
2002-10-25 22:55:53 +00:00
|
|
|
///
|
2003-08-13 18:15:29 +00:00
|
|
|
FunctionPass *createEmitX86CodeToMemory();
|
2002-10-25 22:55:53 +00:00
|
|
|
|
2010-04-06 20:26:37 +00:00
|
|
|
/// createX86MaxStackAlignmentHeuristicPass - This function returns a pass
|
|
|
|
/// which determines whether the frame pointer register should be
|
|
|
|
/// reserved in case dynamic stack alignment is later required.
|
|
|
|
///
|
|
|
|
FunctionPass *createX86MaxStackAlignmentHeuristicPass();
|
|
|
|
|
2010-12-20 15:07:39 +00:00
|
|
|
|
|
|
|
/// createX86MachObjectWriter - Construct an X86 Mach-O object writer.
|
|
|
|
MCObjectWriter *createX86MachObjectWriter(raw_ostream &OS,
|
|
|
|
bool Is64Bit,
|
|
|
|
uint32_t CPUType,
|
|
|
|
uint32_t CPUSubtype);
|
|
|
|
|
2005-01-07 07:48:33 +00:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2002-10-25 22:55:53 +00:00
|
|
|
#endif
|