1234353Sdim//===-- MipsMCInstLower.h - Lower MachineInstr to MCInst -------*- C++ -*--===//
2224133Sdim//
3224133Sdim//                     The LLVM Compiler Infrastructure
4224133Sdim//
5224133Sdim// This file is distributed under the University of Illinois Open Source
6224133Sdim// License. See LICENSE.TXT for details.
7224133Sdim//
8224133Sdim//===----------------------------------------------------------------------===//
9224133Sdim
10224133Sdim#ifndef MIPSMCINSTLOWER_H
11224133Sdim#define MIPSMCINSTLOWER_H
12234353Sdim#include "llvm/ADT/SmallVector.h"
13224133Sdim#include "llvm/CodeGen/MachineOperand.h"
14224133Sdim#include "llvm/Support/Compiler.h"
15224133Sdim
16224133Sdimnamespace llvm {
17224133Sdim  class MCContext;
18224133Sdim  class MCInst;
19224133Sdim  class MCOperand;
20224133Sdim  class MachineInstr;
21224133Sdim  class MachineFunction;
22224133Sdim  class MipsAsmPrinter;
23234353Sdim
24224133Sdim/// MipsMCInstLower - This class is used to lower an MachineInstr into an
25224133Sdim//                    MCInst.
26224133Sdimclass LLVM_LIBRARY_VISIBILITY MipsMCInstLower {
27224133Sdim  typedef MachineOperand::MachineOperandType MachineOperandType;
28234353Sdim  MCContext *Ctx;
29224133Sdim  MipsAsmPrinter &AsmPrinter;
30224133Sdimpublic:
31234353Sdim  MipsMCInstLower(MipsAsmPrinter &asmprinter);
32263508Sdim  void Initialize(MCContext *C);
33224133Sdim  void Lower(const MachineInstr *MI, MCInst &OutMI) const;
34243830Sdim  MCOperand LowerOperand(const MachineOperand& MO, unsigned offset = 0) const;
35239462Sdim
36224133Sdimprivate:
37224133Sdim  MCOperand LowerSymbolOperand(const MachineOperand &MO,
38226633Sdim                               MachineOperandType MOTy, unsigned Offset) const;
39224133Sdim};
40224133Sdim}
41224133Sdim
42224133Sdim#endif
43