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"
22 class MachineFunction;
23 class MachineModuleInfoMachO;
29 /// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst.
30 class LLVM_LIBRARY_VISIBILITY X86MCInstLower {
33 const MachineFunction &MF;
34 const TargetMachine &TM;
37 X86AsmPrinter &AsmPrinter;
39 X86MCInstLower(MCContext &ctx, Mangler *mang, const MachineFunction &MF,
40 X86AsmPrinter &asmprinter);
42 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
44 MCSymbol *GetPICBaseSymbol() const;
46 MCSymbol *GetSymbolFromOperand(const MachineOperand &MO) const;
47 MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
50 MachineModuleInfoMachO &getMachOMMI() const;