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