92196f2202251e6d808c9f5373b640a6958c1d7c
[oota-llvm.git] / lib / Target / MBlaze / MBlazeMCInstLower.h
1 //===-- MBlazeMCInstLower.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 MBLAZE_MCINSTLOWER_H
11 #define MBLAZE_MCINSTLOWER_H
12
13 #include "llvm/Support/Compiler.h"
14
15 namespace llvm {
16   class AsmPrinter;
17   class MCAsmInfo;
18   class MCContext;
19   class MCInst;
20   class MCOperand;
21   class MCSymbol;
22   class MachineInstr;
23   class MachineModuleInfoMachO;
24   class MachineOperand;
25   class Mangler;
26
27   /// MBlazeMCInstLower - This class is used to lower an MachineInstr
28   /// into an MCInst.
29 class LLVM_LIBRARY_VISIBILITY MBlazeMCInstLower {
30   MCContext &Ctx;
31   Mangler &Mang;
32
33   AsmPrinter &Printer;
34 public:
35   MBlazeMCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer)
36     : Ctx(ctx), Mang(mang), Printer(printer) {}
37   void Lower(const MachineInstr *MI, MCInst &OutMI) const;
38
39   MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
40
41   MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
42   MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
43   MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;
44   MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;
45   MCSymbol *GetBlockAddressSymbol(const MachineOperand &MO) const;
46 };
47
48 }
49
50 #endif