LLVM 20.0.0git
M68kMCInstLower.h
Go to the documentation of this file.
1//===-- M68kMCInstLower.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/// \file
10/// This file contains code to lower M68k MachineInstrs to their
11/// corresponding MCInst records.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_M68K_M68KMCINSTLOWER_H
16#define LLVM_LIB_TARGET_M68K_M68KMCINSTLOWER_H
17
19#include "llvm/MC/MCAsmInfo.h"
21
22namespace llvm {
23class MCContext;
24class MCInst;
25class MCOperand;
26class MachineInstr;
27class MachineFunction;
28class M68kAsmPrinter;
29
30/// This class is used to lower an MachineInstr into an MCInst.
33 MCContext &Ctx;
35 const TargetMachine &TM;
36 const MCAsmInfo &MAI;
38
39public:
41
42 /// Lower an MO_GlobalAddress or MO_ExternalSymbol operand to an MCSymbol.
44
46
47 std::optional<MCOperand> LowerOperand(const MachineInstr *MI,
48 const MachineOperand &MO) const;
49
50 void Lower(const MachineInstr *MI, MCInst &OutMI) const;
51};
52} // namespace llvm
53
54#endif // LLVM_LIB_TARGET_M68K_M68KMCINSTLOWER_H
Symbol * Sym
Definition: ELF_riscv.cpp:479
IRTranslator LLVM IR MI
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:86
This class is used to lower an MachineInstr into an MCInst.
MCSymbol * GetSymbolFromOperand(const MachineOperand &MO) const
Lower an MO_GlobalAddress or MO_ExternalSymbol operand to an MCSymbol.
MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const
std::optional< MCOperand > LowerOperand(const MachineInstr *MI, const MachineOperand &MO) const
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
Context object for machine code objects.
Definition: MCContext.h:83
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
Instances of this class represent operands of the MCInst class.
Definition: MCInst.h:36
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
Representation of each machine instruction.
Definition: MachineInstr.h:69
MachineOperand class - Representation of each machine instruction operand.
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:77
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18