X86InstrInfo.cpp revision 33f53b554acfff0b15f08d551fce5b0701b443c0
1//===- X86InstructionInfo.cpp - X86 Instruction Information ---------------===// 2// 3// This file contains the X86 implementation of the MachineInstrInfo class. 4// 5//===----------------------------------------------------------------------===// 6 7#include "X86InstructionInfo.h" 8#include "llvm/CodeGen/MachineInstr.h" 9#include <iostream> 10 11// X86Insts - Turn the InstructionInfo.def file into a bunch of instruction 12// descriptors 13// 14static const MachineInstrDescriptor X86Insts[] = { 15#define I(ENUM, NAME, FLAGS, TSFLAGS) \ 16 { NAME, -1, -1, 0, false, 0, 0, TSFLAGS, FLAGS }, 17#include "X86InstructionInfo.def" 18}; 19 20X86InstructionInfo::X86InstructionInfo() 21 : MachineInstrInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0]), 0) { 22} 23 24 25// print - Print out an x86 instruction in GAS syntax 26void X86InstructionInfo::print(const MachineInstr *MI, std::ostream &O) const { 27 // FIXME: This sucks. 28 O << getName(MI->getOpCode()) << "\n"; 29} 30 31