LLVM API Documentation
00001 //===-- MipsMCInstLower.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 MIPSMCINSTLOWER_H 00011 #define MIPSMCINSTLOWER_H 00012 #include "llvm/ADT/SmallVector.h" 00013 #include "llvm/CodeGen/MachineOperand.h" 00014 #include "llvm/Support/Compiler.h" 00015 00016 namespace llvm { 00017 class MCContext; 00018 class MCInst; 00019 class MCOperand; 00020 class MachineInstr; 00021 class MachineFunction; 00022 class Mangler; 00023 class MipsAsmPrinter; 00024 00025 /// MipsMCInstLower - This class is used to lower an MachineInstr into an 00026 // MCInst. 00027 class LLVM_LIBRARY_VISIBILITY MipsMCInstLower { 00028 typedef MachineOperand::MachineOperandType MachineOperandType; 00029 MCContext *Ctx; 00030 Mangler *Mang; 00031 MipsAsmPrinter &AsmPrinter; 00032 public: 00033 MipsMCInstLower(MipsAsmPrinter &asmprinter); 00034 void Initialize(Mangler *mang, MCContext *C); 00035 void Lower(const MachineInstr *MI, MCInst &OutMI) const; 00036 MCOperand LowerOperand(const MachineOperand& MO, unsigned offset = 0) const; 00037 00038 private: 00039 MCOperand LowerSymbolOperand(const MachineOperand &MO, 00040 MachineOperandType MOTy, unsigned Offset) const; 00041 }; 00042 } 00043 00044 #endif