add jump tables, constant pools and some trivial global
[oota-llvm.git] / lib / Target / ARM / AsmPrinter / ARMMCInstLower.h
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 //===----------------------------------------------------------------------===//
9
10 #ifndef ARM_MCINSTLOWER_H
11 #define ARM_MCINSTLOWER_H
12
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 MachineModuleInfoMachO;
23   class MachineOperand;
24   class Mangler;
25   //class ARMSubtarget;
26   
27 /// ARMMCInstLower - This class is used to lower an MachineInstr into an MCInst.
28 class VISIBILITY_HIDDEN ARMMCInstLower {
29   MCContext &Ctx;
30   Mangler &Mang;
31   
32   const unsigned CurFunctionNumber;
33   const MCAsmInfo &MAI;
34
35   //const ARMSubtarget &getSubtarget() const;
36 public:
37   ARMMCInstLower(MCContext &ctx, Mangler &mang, unsigned FuncNum,
38                  const MCAsmInfo &mai)
39     : Ctx(ctx), Mang(mang), CurFunctionNumber(FuncNum), MAI(mai) {}
40   
41   void Lower(const MachineInstr *MI, MCInst &OutMI) const;
42
43   //MCSymbol *GetPICBaseSymbol() const;
44   MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const;
45   //MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const;
46   MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;
47   MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;
48   MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
49   
50 /*
51 private:
52   MachineModuleInfoMachO &getMachOMMI() const;
53  */
54 };
55
56 }
57
58 #endif