Chris Lattner | 9cf0eb5 | 2009-10-19 20:21:05 +0000 | [diff] [blame] | 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 { |
Chris Lattner | 6f99776 | 2009-10-19 21:53:00 +0000 | [diff] [blame^] | 16 | class MCAsmInfo; |
Chris Lattner | 9cf0eb5 | 2009-10-19 20:21:05 +0000 | [diff] [blame] | 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; |
Chris Lattner | 6f99776 | 2009-10-19 21:53:00 +0000 | [diff] [blame^] | 30 | Mangler &Mang; |
| 31 | |
| 32 | const unsigned CurFunctionNumber; |
| 33 | const MCAsmInfo &MAI; |
Chris Lattner | 9cf0eb5 | 2009-10-19 20:21:05 +0000 | [diff] [blame] | 34 | |
| 35 | //const ARMSubtarget &getSubtarget() const; |
| 36 | public: |
Chris Lattner | 6f99776 | 2009-10-19 21:53:00 +0000 | [diff] [blame^] | 37 | ARMMCInstLower(MCContext &ctx, Mangler &mang, unsigned FuncNum, |
| 38 | const MCAsmInfo &mai) |
| 39 | : Ctx(ctx), Mang(mang), CurFunctionNumber(FuncNum), MAI(mai) {} |
Chris Lattner | 9cf0eb5 | 2009-10-19 20:21:05 +0000 | [diff] [blame] | 40 | |
| 41 | void Lower(const MachineInstr *MI, MCInst &OutMI) const; |
| 42 | |
Chris Lattner | 6f99776 | 2009-10-19 21:53:00 +0000 | [diff] [blame^] | 43 | //MCSymbol *GetPICBaseSymbol() const; |
Chris Lattner | 9cf0eb5 | 2009-10-19 20:21:05 +0000 | [diff] [blame] | 44 | MCSymbol *GetGlobalAddressSymbol(const MachineOperand &MO) const; |
Chris Lattner | 6f99776 | 2009-10-19 21:53:00 +0000 | [diff] [blame^] | 45 | //MCSymbol *GetExternalSymbolSymbol(const MachineOperand &MO) const; |
Chris Lattner | 9cf0eb5 | 2009-10-19 20:21:05 +0000 | [diff] [blame] | 46 | MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const; |
| 47 | MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const; |
| 48 | MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const; |
| 49 | |
Chris Lattner | 6f99776 | 2009-10-19 21:53:00 +0000 | [diff] [blame^] | 50 | /* |
Chris Lattner | 9cf0eb5 | 2009-10-19 20:21:05 +0000 | [diff] [blame] | 51 | private: |
| 52 | MachineModuleInfoMachO &getMachOMMI() const; |
| 53 | */ |
| 54 | }; |
| 55 | |
| 56 | } |
| 57 | |
| 58 | #endif |