1 //===-- X86MCInstLower.h - Lower MachineInstr to MCInst -------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef X86_MCINSTLOWER_H
11 #define X86_MCINSTLOWER_H
13 #include "llvm/Support/Compiler.h"
23 class X86ATTAsmPrinter;
26 /// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst.
27 class VISIBILITY_HIDDEN X86MCInstLower {
30 X86ATTAsmPrinter &AsmPrinter;
32 const X86Subtarget &getSubtarget() const;
34 X86MCInstLower(MCContext &ctx, Mangler *mang, X86ATTAsmPrinter &asmprinter)
35 : Ctx(ctx), Mang(mang), AsmPrinter(asmprinter) {}
37 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
39 MCSymbol *GetPICBaseSymbol() const;
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;