1//===-- SystemZMCInstLower.h - Lower MachineInstr to MCInst ----*- C++ -*--===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMCINSTLOWER_H
10#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMCINSTLOWER_H
11
12#include "llvm/MC/MCExpr.h"
13#include "llvm/Support/Compiler.h"
14#include "llvm/Support/DataTypes.h"
15
16namespace llvm {
17class MCInst;
18class MCOperand;
19class MachineInstr;
20class MachineOperand;
21class SystemZAsmPrinter;
22
23class LLVM_LIBRARY_VISIBILITY SystemZMCInstLower {
24 MCContext &Ctx;
25 SystemZAsmPrinter &AsmPrinter;
26
27public:
28 SystemZMCInstLower(MCContext &ctx, SystemZAsmPrinter &asmPrinter);
29
30 // Lower MachineInstr MI to MCInst OutMI.
31 void lower(const MachineInstr *MI, MCInst &OutMI) const;
32
33 // Return an MCOperand for MO.
34 MCOperand lowerOperand(const MachineOperand& MO) const;
35
36 // Return an MCExpr for symbolic operand MO with variant kind Kind.
37 const MCExpr *getExpr(const MachineOperand &MO,
38 MCSymbolRefExpr::VariantKind Kind) const;
39};
40} // end namespace llvm
41
42#endif
43