aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86InstrInfo.cpp
blob: f7185348ef96adf3d50c4f071bcca08e6ae0f8b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//===- X86InstructionInfo.cpp - X86 Instruction Information ---------------===//
//
// This file contains the X86 implementation of the MInstructionInfo class.
//
//===----------------------------------------------------------------------===//

#include "X86InstructionInfo.h"
#include "llvm/CodeGen/MInstruction.h"
#include <ostream>

// X86Insts - Turn the InstructionInfo.def file into a bunch of instruction
// descriptors
//
static const MInstructionDesc X86Insts[] = {
#define I(ENUM, NAME, FLAGS, TSFLAGS) { NAME, FLAGS, TSFLAGS },
#include "X86InstructionInfo.def"
};

X86InstructionInfo::X86InstructionInfo()
  : MInstructionInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0])) {
}


// print - Print out an x86 instruction in GAS syntax
void X86InstructionInfo::print(const MInstruction *MI, std::ostream &O) const {
  // FIXME: This sucks.
  O << get(MI->getOpcode()).Name << "\n";
}