LLVM
20.0.0git
lib
Target
M68k
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
18
#include "
llvm/CodeGen/MachineOperand.h
"
19
#include "
llvm/MC/MCAsmInfo.h
"
20
#include "
llvm/Target/TargetMachine.h
"
21
22
namespace
llvm
{
23
class
MCContext;
24
class
MCInst;
25
class
MCOperand;
26
class
MachineInstr;
27
class
MachineFunction;
28
class
M68kAsmPrinter;
29
30
/// This class is used to lower an MachineInstr into an MCInst.
31
class
M68kMCInstLower
{
32
typedef
MachineOperand::MachineOperandType
MachineOperandType
;
33
MCContext
&Ctx;
34
MachineFunction
&MF;
35
const
TargetMachine
&TM;
36
const
MCAsmInfo
&MAI;
37
M68kAsmPrinter
&
AsmPrinter
;
38
39
public
:
40
M68kMCInstLower
(
MachineFunction
&MF,
M68kAsmPrinter
&AP);
41
42
/// Lower an MO_GlobalAddress or MO_ExternalSymbol operand to an MCSymbol.
43
MCSymbol
*
GetSymbolFromOperand
(
const
MachineOperand
&MO)
const
;
44
45
MCOperand
LowerSymbolOperand
(
const
MachineOperand
&MO,
MCSymbol
*
Sym
)
const
;
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
Sym
Symbol * Sym
Definition:
ELF_riscv.cpp:479
MI
IRTranslator LLVM IR MI
Definition:
IRTranslator.cpp:113
MCAsmInfo.h
MachineOperand.h
llvm::AsmPrinter
This class is intended to be used as a driving class for all asm writers.
Definition:
AsmPrinter.h:86
llvm::M68kAsmPrinter
Definition:
M68kAsmPrinter.h:40
llvm::M68kMCInstLower
This class is used to lower an MachineInstr into an MCInst.
Definition:
M68kMCInstLower.h:31
llvm::M68kMCInstLower::GetSymbolFromOperand
MCSymbol * GetSymbolFromOperand(const MachineOperand &MO) const
Lower an MO_GlobalAddress or MO_ExternalSymbol operand to an MCSymbol.
Definition:
M68kMCInstLower.cpp:39
llvm::M68kMCInstLower::LowerSymbolOperand
MCOperand LowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const
Definition:
M68kMCInstLower.cpp:73
llvm::M68kMCInstLower::LowerOperand
std::optional< MCOperand > LowerOperand(const MachineInstr *MI, const MachineOperand &MO) const
Definition:
M68kMCInstLower.cpp:129
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition:
MCAsmInfo.h:56
llvm::MCContext
Context object for machine code objects.
Definition:
MCContext.h:83
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition:
MCInst.h:184
llvm::MCOperand
Instances of this class represent operands of the MCInst class.
Definition:
MCInst.h:36
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition:
MCSymbol.h:41
llvm::MachineFunction
Definition:
MachineFunction.h:257
llvm::MachineInstr
Representation of each machine instruction.
Definition:
MachineInstr.h:69
llvm::MachineOperand
MachineOperand class - Representation of each machine instruction operand.
Definition:
MachineOperand.h:48
llvm::MachineOperand::MachineOperandType
MachineOperandType
Definition:
MachineOperand.h:50
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition:
TargetMachine.h:77
TargetMachine.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::HexPrintStyle::Lower
@ Lower
Generated on Sat Oct 12 2024 06:25:54 for LLVM by
1.9.6