Home | History | Annotate | Download | only in MCTargetDesc
      1 //===-- MipsMCCodeEmitter.cpp - Convert Mips code to machine code ---------===//
      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 file implements the MipsMCCodeEmitter class.
     11 //
     12 //===----------------------------------------------------------------------===//
     13 //
     14 #define DEBUG_TYPE "mccodeemitter"
     15 #include "llvm/MC/MCCodeEmitter.h"
     16 #include "llvm/MC/MCExpr.h"
     17 #include "llvm/MC/MCInst.h"
     18 #include "llvm/MC/MCInstrInfo.h"
     19 #include "llvm/MC/MCRegisterInfo.h"
     20 #include "llvm/MC/MCSubtargetInfo.h"
     21 #include "llvm/ADT/APFloat.h"
     22 #include "llvm/ADT/Statistic.h"
     23 #include "llvm/Support/raw_ostream.h"
     24 #include "MCTargetDesc/MipsMCTargetDesc.h"
     25 
     26 using namespace llvm;
     27 
     28 namespace {
     29 class MipsMCCodeEmitter : public MCCodeEmitter {
     30   MipsMCCodeEmitter(const MipsMCCodeEmitter &); // DO NOT IMPLEMENT
     31   void operator=(const MipsMCCodeEmitter &); // DO NOT IMPLEMENT
     32   const MCInstrInfo &MCII;
     33   const MCSubtargetInfo &STI;
     34 
     35 public:
     36   MipsMCCodeEmitter(const MCInstrInfo &mcii, const MCSubtargetInfo &sti,
     37                     MCContext &ctx)
     38     : MCII(mcii), STI(sti) {}
     39 
     40   ~MipsMCCodeEmitter() {}
     41 
     42   void EncodeInstruction(const MCInst &MI, raw_ostream &OS,
     43                          SmallVectorImpl<MCFixup> &Fixups) const {
     44   }
     45 }; // class MipsMCCodeEmitter
     46 }  // namespace
     47 
     48 MCCodeEmitter *llvm::createMipsMCCodeEmitter(const MCInstrInfo &MCII,
     49                                              const MCSubtargetInfo &STI,
     50                                              MCContext &Ctx) {
     51   return new MipsMCCodeEmitter(MCII, STI, Ctx);
     52 }
     53