blob: 06abb4dbf7bd6e8f1976965988a05ffeda2f13e9 [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"
Chris Lattner9bbf4392002-10-29 17:43:19 +00008#include "llvm/CodeGen/MachineInstr.h"
9#include <iostream>
Chris Lattner72614082002-10-25 22:55:53 +000010
11// X86Insts - Turn the InstructionInfo.def file into a bunch of instruction
12// descriptors
13//
Chris Lattner9bbf4392002-10-29 17:43:19 +000014static const MachineInstrDescriptor X86Insts[] = {
15#define I(ENUM, NAME, FLAGS, TSFLAGS) \
16 { NAME, -1, -1, 0, false, 0, 0, TSFLAGS, FLAGS },
Chris Lattner72614082002-10-25 22:55:53 +000017#include "X86InstructionInfo.def"
18};
19
20X86InstructionInfo::X86InstructionInfo()
Chris Lattner9bbf4392002-10-29 17:43:19 +000021 : MachineInstrInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0]), 0) {
Chris Lattner72614082002-10-25 22:55:53 +000022}
23
24
25// print - Print out an x86 instruction in GAS syntax
Chris Lattner9bbf4392002-10-29 17:43:19 +000026void X86InstructionInfo::print(const MachineInstr *MI, std::ostream &O) const {
Chris Lattner72614082002-10-25 22:55:53 +000027 // FIXME: This sucks.
Chris Lattner9bbf4392002-10-29 17:43:19 +000028 O << getName(MI->getOpCode()) << "\n";
Chris Lattner72614082002-10-25 22:55:53 +000029}
30