zpu: wip eke out some simple instructions for load/store/add
[llvm/zpu.git] / lib / Target / X86 / X86MCInstLower.h
blob539b09be6fd746dac27e0e9b942c88876623d74f
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 //===----------------------------------------------------------------------===//
10 #ifndef X86_MCINSTLOWER_H
11 #define X86_MCINSTLOWER_H
13 #include "llvm/Support/Compiler.h"
15 namespace llvm {
16 class MCAsmInfo;
17 class MCContext;
18 class MCInst;
19 class MCOperand;
20 class MCSymbol;
21 class MachineInstr;
22 class MachineFunction;
23 class MachineModuleInfoMachO;
24 class MachineOperand;
25 class Mangler;
26 class TargetMachine;
27 class X86AsmPrinter;
29 /// X86MCInstLower - This class is used to lower an MachineInstr into an MCInst.
30 class LLVM_LIBRARY_VISIBILITY X86MCInstLower {
31 MCContext &Ctx;
32 Mangler *Mang;
33 const MachineFunction &MF;
34 const TargetMachine &TM;
35 const MCAsmInfo &MAI;
36 X86AsmPrinter &AsmPrinter;
37 public:
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;
48 private:
49 MachineModuleInfoMachO &getMachOMMI() const;
54 #endif