LLVM API Documentation

XCoreMCInstLower.h
Go to the documentation of this file.
00001 //===-- XCoreMCInstLower.h - Lower MachineInstr to MCInst ------*- C++ -*--===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_LIB_TARGET_XCORE_XCOREMCINSTLOWER_H
00011 #define LLVM_LIB_TARGET_XCORE_XCOREMCINSTLOWER_H
00012 #include "llvm/CodeGen/MachineOperand.h"
00013 #include "llvm/Support/Compiler.h"
00014 
00015 namespace llvm {
00016   class MCContext;
00017   class MCInst;
00018   class MCOperand;
00019   class MachineInstr;
00020   class MachineFunction;
00021   class Mangler;
00022   class AsmPrinter;
00023 
00024 /// \brief This class is used to lower an MachineInstr into an MCInst.
00025 class LLVM_LIBRARY_VISIBILITY XCoreMCInstLower {
00026   typedef MachineOperand::MachineOperandType MachineOperandType;
00027   MCContext *Ctx;
00028   Mangler *Mang;
00029   AsmPrinter &Printer;
00030 public:
00031   XCoreMCInstLower(class AsmPrinter &asmprinter);
00032   void Initialize(Mangler *mang, MCContext *C);
00033   void Lower(const MachineInstr *MI, MCInst &OutMI) const;
00034   MCOperand LowerOperand(const MachineOperand& MO, unsigned offset = 0) const;
00035 
00036 private:
00037   MCOperand LowerSymbolOperand(const MachineOperand &MO,
00038                                MachineOperandType MOTy, unsigned Offset) const;
00039 };
00040 }
00041 
00042 #endif