blob: f7185348ef96adf3d50c4f071bcca08e6ae0f8b7 [file] [log] [blame]
Chris Lattner72614082002-10-25 22:55:53 +00001//===- X86InstructionInfo.cpp - X86 Instruction Information ---------------===//
2//
3// This file contains the X86 implementation of the MInstructionInfo class.
4//
5//===----------------------------------------------------------------------===//
6
7#include "X86InstructionInfo.h"
8#include "llvm/CodeGen/MInstruction.h"
9#include <ostream>
10
11// X86Insts - Turn the InstructionInfo.def file into a bunch of instruction
12// descriptors
13//
14static const MInstructionDesc X86Insts[] = {
15#define I(ENUM, NAME, FLAGS, TSFLAGS) { NAME, FLAGS, TSFLAGS },
16#include "X86InstructionInfo.def"
17};
18
19X86InstructionInfo::X86InstructionInfo()
20 : MInstructionInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0])) {
21}
22
23
24// print - Print out an x86 instruction in GAS syntax
25void X86InstructionInfo::print(const MInstruction *MI, std::ostream &O) const {
26 // FIXME: This sucks.
27 O << get(MI->getOpcode()).Name << "\n";
28}
29