adb93f2b7f41c654f06935d02a3d335d6c86e335
[oota-llvm.git] / lib / Target / PowerPC / InstPrinter / PPCInstPrinter.cpp
1 //===-- PPCInstPrinter.cpp - Convert PPC MCInst to assembly syntax --------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This class prints an PPC MCInst to a .s file.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #define DEBUG_TYPE "asm-printer"
15 #include "PPCInstPrinter.h"
16 #include "llvm/MC/MCInst.h"
17 //#include "llvm/MC/MCAsmInfo.h"
18 //#include "llvm/MC/MCExpr.h"
19 //#include "llvm/ADT/StringExtras.h"
20 #include "llvm/Support/raw_ostream.h"
21
22 #include "PPCGenRegisterNames.inc"
23 #include "PPCGenInstrNames.inc"
24 using namespace llvm;
25
26 #define GET_INSTRUCTION_NAME
27 #define PPCAsmPrinter PPCInstPrinter
28 #define MachineInstr MCInst
29 #include "PPCGenAsmWriter.inc"
30
31 StringRef PPCInstPrinter::getOpcodeName(unsigned Opcode) const {
32   return getInstructionName(Opcode);
33 }
34
35
36 void PPCInstPrinter::printInst(const MCInst *MI, raw_ostream &O) {
37   // TODO: pseudo ops.
38   
39   printInstruction(MI, O);
40 }
41