Chris Lattner | 1efc2ad | 2009-09-12 20:34:57 +0000 | [diff] [blame] | 1 | //===-- X86MCInstLower.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 X86_MCINSTLOWER_H |
| 11 | #define X86_MCINSTLOWER_H |
| 12 | |
| 13 | |
| 14 | namespace llvm { |
| 15 | class MCContext; |
| 16 | class MCInst; |
| 17 | class MCOperand; |
| 18 | class MCSymbol; |
| 19 | class MachineInstr; |
| 20 | class MachineOperand; |
| 21 | class Mangler; |
| 22 | class X86ATTAsmPrinter; |
| 23 | class X86Subtarget; |
| 24 | |
| 25 | class X86MCInstLower { |
| 26 | MCContext &Ctx; |
| 27 | Mangler *Mang; |
| 28 | X86ATTAsmPrinter &AsmPrinter; |
| 29 | public: |
| 30 | X86MCInstLower(MCContext &ctx, Mangler *mang, X86ATTAsmPrinter &asmprinter) |
| 31 | : Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {} |
| 32 | |
| 33 | void Lower(const MachineInstr *MI, MCInst &OutMI) const; |
| 34 | |
| 35 | MCSymbol *GetPICBaseSymbol() const; |
| 36 | |
| 37 | private: |
| 38 | const X86Subtarget &getSubtarget() const; |
| 39 | |
Chris Lattner | 34461fd | 2009-09-12 20:45:03 +0000 | [diff] [blame^] | 40 | MCOperand LowerMBBOperand(const MachineOperand &MO) const; |
Chris Lattner | 1efc2ad | 2009-09-12 20:34:57 +0000 | [diff] [blame] | 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 | MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const; |
| 46 | }; |
| 47 | |
| 48 | } |
| 49 | |
| 50 | #endif |