Home | History | Annotate | Download | only in Mips
      1 //===-- MipsMCInstLower.h - Lower MachineInstr to MCInst -------------------==//
      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 #ifndef MIPSMCINSTLOWER_H
     11 #define MIPSMCINSTLOWER_H
     12 #include "llvm/CodeGen/MachineOperand.h"
     13 #include "llvm/Support/Compiler.h"
     14 
     15 namespace llvm {
     16   class MCAsmInfo;
     17   class MCContext;
     18   class MCInst;
     19   class MCOperand;
     20   class MCSymbol;
     21   class MachineInstr;
     22   class MachineFunction;
     23   class Mangler;
     24   class MipsAsmPrinter;
     25 
     26 /// MipsMCInstLower - This class is used to lower an MachineInstr into an
     27 //                    MCInst.
     28 class LLVM_LIBRARY_VISIBILITY MipsMCInstLower {
     29   typedef MachineOperand::MachineOperandType MachineOperandType;
     30   MCContext &Ctx;
     31   Mangler *Mang;
     32   MipsAsmPrinter &AsmPrinter;
     33 public:
     34   MipsMCInstLower(Mangler *mang, const MachineFunction &MF,
     35                   MipsAsmPrinter &asmprinter);
     36   void Lower(const MachineInstr *MI, MCInst &OutMI) const;
     37 private:
     38   MCOperand LowerSymbolOperand(const MachineOperand &MO,
     39                                MachineOperandType MOTy, unsigned Offset) const;
     40   MCOperand LowerOperand(const MachineOperand& MO) const;
     41 };
     42 }
     43 
     44 #endif
     45