1 //===-- X86/X86MCCodeEmitter.cpp - Convert X86 code to machine code -------===//
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 implements the X86MCCodeEmitter class.
12 //===----------------------------------------------------------------------===//
14 #define DEBUG_TYPE "x86-emitter"
16 #include "X86TargetMachine.h"
17 #include "llvm/MC/MCCodeEmitter.h"
21 class X86MCCodeEmitter : public MCCodeEmitter {
22 X86MCCodeEmitter(const X86MCCodeEmitter &); // DO NOT IMPLEMENT
23 void operator=(const X86MCCodeEmitter &); // DO NOT IMPLEMENT
26 X86MCCodeEmitter(X86TargetMachine &tm) : TM(tm) {
29 ~X86MCCodeEmitter() {}
31 void EncodeInstruction(const MCInst &MI, raw_ostream &OS) const {
35 } // end anonymous namespace
38 MCCodeEmitter *llvm::createX86MCCodeEmitter(const Target &,
40 return new X86MCCodeEmitter(static_cast<X86TargetMachine&>(TM));