1//===-- SystemZMCInstLower.h - Lower MachineInstr to MCInst ----*- C++ -*--===// 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//===----------------------------------------------------------------------===// 9 10#ifndef LLVM_SYSTEMZMCINSTLOWER_H 11#define LLVM_SYSTEMZMCINSTLOWER_H 12 13#include "llvm/MC/MCExpr.h" 14#include "llvm/Support/Compiler.h" 15#include "llvm/Support/DataTypes.h" 16 17namespace llvm { 18class MCInst; 19class MCOperand; 20class MachineInstr; 21class MachineOperand; 22class Mangler; 23class SystemZAsmPrinter; 24 25class LLVM_LIBRARY_VISIBILITY SystemZMCInstLower { 26 MCContext &Ctx; 27 SystemZAsmPrinter &AsmPrinter; 28 29public: 30 SystemZMCInstLower(MCContext &ctx, SystemZAsmPrinter &asmPrinter); 31 32 // Lower MachineInstr MI to MCInst OutMI. 33 void lower(const MachineInstr *MI, MCInst &OutMI) const; 34 35 // Return an MCOperand for MO. 36 MCOperand lowerOperand(const MachineOperand& MO) const; 37 38 // Return an MCExpr for symbolic operand MO with variant kind Kind. 39 const MCExpr *getExpr(const MachineOperand &MO, 40 MCSymbolRefExpr::VariantKind Kind) const; 41}; 42} // end namespace llvm 43 44#endif 45