Fixed some bugs.
[llvm/zpu.git] / lib / Target / ARM / ARMMCInstLower.h
blobc4d27f88df111c53d6964dd8c17c2dbb3875cff2
1 //===-- ARMMCInstLower.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 //===----------------------------------------------------------------------===//
10 #ifndef ARM_MCINSTLOWER_H
11 #define ARM_MCINSTLOWER_H
13 #include "llvm/Support/Compiler.h"
15 namespace llvm {
16 class AsmPrinter;
17 class GlobalValue;
18 class MCAsmInfo;
19 class MCContext;
20 class MCInst;
21 class MCOperand;
22 class MCSymbol;
23 class MCSymbolRefExpr;
24 class MachineInstr;
25 class MachineModuleInfoMachO;
26 class MachineOperand;
27 class Mangler;
28 //class ARMSubtarget;
30 /// ARMMCInstLower - This class is used to lower an MachineInstr into an MCInst.
31 class LLVM_LIBRARY_VISIBILITY ARMMCInstLower {
32 MCContext &Ctx;
33 Mangler &Mang;
34 AsmPrinter &Printer;
36 //const ARMSubtarget &getSubtarget() const;
37 public:
38 ARMMCInstLower(MCContext &ctx, Mangler &mang, AsmPrinter &printer)
39 : Ctx(ctx), Mang(mang), Printer(printer) {}
41 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
43 //MCSymbol *GetPICBaseSymbol() const;
44 MCSymbol *GetGlobalAddressSymbol(const GlobalValue *GV) const;
45 const MCSymbolRefExpr *GetSymbolRef(const MachineOperand &MO) const;
46 const MCSymbolRefExpr *GetExternalSymbolSymbol(const MachineOperand &MO)
47 const;
48 MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;
49 MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;
50 MCOperand LowerSymbolRefOperand(const MachineOperand &MO,
51 const MCSymbolRefExpr *Expr) const;
52 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
55 private:
56 MachineModuleInfoMachO &getMachOMMI() const;
62 #endif