1249259Sdim//===-- XCoreMCInstLower.h - Lower MachineInstr to MCInst ------*- C++ -*--===//
2249259Sdim//
3249259Sdim//                     The LLVM Compiler Infrastructure
4249259Sdim//
5249259Sdim// This file is distributed under the University of Illinois Open Source
6249259Sdim// License. See LICENSE.TXT for details.
7249259Sdim//
8249259Sdim//===----------------------------------------------------------------------===//
9249259Sdim
10249259Sdim#ifndef XCOREMCINSTLOWER_H
11249259Sdim#define XCOREMCINSTLOWER_H
12249259Sdim#include "llvm/CodeGen/MachineOperand.h"
13249259Sdim#include "llvm/Support/Compiler.h"
14249259Sdim
15249259Sdimnamespace llvm {
16249259Sdim  class MCContext;
17249259Sdim  class MCInst;
18249259Sdim  class MCOperand;
19249259Sdim  class MachineInstr;
20249259Sdim  class MachineFunction;
21249259Sdim  class Mangler;
22249259Sdim  class AsmPrinter;
23249259Sdim
24249259Sdim/// \brief This class is used to lower an MachineInstr into an MCInst.
25249259Sdimclass LLVM_LIBRARY_VISIBILITY XCoreMCInstLower {
26249259Sdim  typedef MachineOperand::MachineOperandType MachineOperandType;
27249259Sdim  MCContext *Ctx;
28249259Sdim  Mangler *Mang;
29249259Sdim  AsmPrinter &Printer;
30249259Sdimpublic:
31249259Sdim  XCoreMCInstLower(class AsmPrinter &asmprinter);
32249259Sdim  void Initialize(Mangler *mang, MCContext *C);
33249259Sdim  void Lower(const MachineInstr *MI, MCInst &OutMI) const;
34249259Sdim  MCOperand LowerOperand(const MachineOperand& MO, unsigned offset = 0) const;
35249259Sdim
36249259Sdimprivate:
37249259Sdim  MCOperand LowerSymbolOperand(const MachineOperand &MO,
38249259Sdim                               MachineOperandType MOTy, unsigned Offset) const;
39249259Sdim};
40249259Sdim}
41249259Sdim
42249259Sdim#endif
43