Path: blob/main/contrib/llvm-project/llvm/lib/Target/M68k/M68kMCInstLower.h
35267 views
//===-- M68kMCInstLower.h - Lower MachineInstr to MCInst --------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7///8/// \file9/// This file contains code to lower M68k MachineInstrs to their10/// corresponding MCInst records.11///12//===----------------------------------------------------------------------===//1314#ifndef LLVM_LIB_TARGET_M68K_M68KMCINSTLOWER_H15#define LLVM_LIB_TARGET_M68K_M68KMCINSTLOWER_H1617#include "llvm/CodeGen/MachineOperand.h"18#include "llvm/MC/MCAsmInfo.h"19#include "llvm/Target/TargetMachine.h"2021namespace llvm {22class MCContext;23class MCInst;24class MCOperand;25class MachineInstr;26class MachineFunction;27class M68kAsmPrinter;2829/// This class is used to lower an MachineInstr into an MCInst.30class M68kMCInstLower {31typedef MachineOperand::MachineOperandType MachineOperandType;32MCContext &Ctx;33MachineFunction &MF;34const TargetMachine &TM;35const MCAsmInfo &MAI;36M68kAsmPrinter &AsmPrinter;3738public:39M68kMCInstLower(MachineFunction &MF, M68kAsmPrinter &AP);4041/// Lower an MO_GlobalAddress or MO_ExternalSymbol operand to an MCSymbol.42MCSymbol *GetSymbolFromOperand(const MachineOperand &MO) const;4344MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;4546std::optional<MCOperand> LowerOperand(const MachineInstr *MI,47const MachineOperand &MO) const;4849void Lower(const MachineInstr *MI, MCInst &OutMI) const;50};51} // namespace llvm5253#endif // LLVM_LIB_TARGET_M68K_M68KMCINSTLOWER_H545556