mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
da0a66f223
Summary: This class deals with the lowering of CodeGen `MachineInstr` objects to MC `MCInst` objects. Reviewers: kparzysz, arsenm Subscribers: wdng, beanz, japaric, mgorny Differential Revision: https://reviews.llvm.org/D25269 llvm-svn: 283522
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
//===-- AVRMCInstLower.h - Lower MachineInstr to MCInst ---------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_AVR_MCINST_LOWER_H
|
|
#define LLVM_AVR_MCINST_LOWER_H
|
|
|
|
#include "llvm/Support/Compiler.h"
|
|
|
|
namespace llvm {
|
|
|
|
class AsmPrinter;
|
|
class MachineInstr;
|
|
class MachineOperand;
|
|
class MCContext;
|
|
class MCInst;
|
|
class MCOperand;
|
|
class MCSymbol;
|
|
|
|
/// Lowers `MachineInstr` objects into `MCInst` objects.
|
|
class AVRMCInstLower {
|
|
public:
|
|
AVRMCInstLower(MCContext &Ctx, AsmPrinter &Printer)
|
|
: Ctx(Ctx), Printer(Printer) {}
|
|
|
|
/// Lowers a `MachineInstr` into a `MCInst`.
|
|
void lowerInstruction(const MachineInstr &MI, MCInst &OutMI) const;
|
|
MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
|
|
|
|
private:
|
|
MCContext &Ctx;
|
|
AsmPrinter &Printer;
|
|
};
|
|
|
|
} // end namespace llvm
|
|
|
|
#endif // LLVM_AVR_MCINST_LOWER_H
|
|
|