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
;
36 X86AsmPrinter
&AsmPrinter
;
38 X86MCInstLower(Mangler
*mang
, const MachineFunction
&MF
,
39 X86AsmPrinter
&asmprinter
);
41 void Lower(const MachineInstr
*MI
, MCInst
&OutMI
) const;
43 MCSymbol
*GetPICBaseSymbol() const;
45 MCSymbol
*GetSymbolFromOperand(const MachineOperand
&MO
) const;
46 MCOperand
LowerSymbolOperand(const MachineOperand
&MO
, MCSymbol
*Sym
) const;
49 MachineModuleInfoMachO
&getMachOMMI() const;