10b57cec5SDimitry Andric //===-- AVRMCInstLower.h - Lower MachineInstr to MCInst ---------*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #ifndef LLVM_AVR_MCINST_LOWER_H 100b57cec5SDimitry Andric #define LLVM_AVR_MCINST_LOWER_H 110b57cec5SDimitry Andric 12*bdd1243dSDimitry Andric #include "AVRSubtarget.h" 130b57cec5SDimitry Andric #include "llvm/Support/Compiler.h" 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric namespace llvm { 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric class AsmPrinter; 180b57cec5SDimitry Andric class MachineInstr; 190b57cec5SDimitry Andric class MachineOperand; 200b57cec5SDimitry Andric class MCContext; 210b57cec5SDimitry Andric class MCInst; 220b57cec5SDimitry Andric class MCOperand; 230b57cec5SDimitry Andric class MCSymbol; 240b57cec5SDimitry Andric 250b57cec5SDimitry Andric /// Lowers `MachineInstr` objects into `MCInst` objects. 260b57cec5SDimitry Andric class AVRMCInstLower { 270b57cec5SDimitry Andric public: AVRMCInstLower(MCContext & Ctx,AsmPrinter & Printer)280b57cec5SDimitry Andric AVRMCInstLower(MCContext &Ctx, AsmPrinter &Printer) 290b57cec5SDimitry Andric : Ctx(Ctx), Printer(Printer) {} 300b57cec5SDimitry Andric 310b57cec5SDimitry Andric /// Lowers a `MachineInstr` into a `MCInst`. 320b57cec5SDimitry Andric void lowerInstruction(const MachineInstr &MI, MCInst &OutMI) const; 33*bdd1243dSDimitry Andric MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym, 34*bdd1243dSDimitry Andric const AVRSubtarget &Subtarget) const; 350b57cec5SDimitry Andric 360b57cec5SDimitry Andric private: 370b57cec5SDimitry Andric MCContext &Ctx; 380b57cec5SDimitry Andric AsmPrinter &Printer; 390b57cec5SDimitry Andric }; 400b57cec5SDimitry Andric 410b57cec5SDimitry Andric } // end namespace llvm 420b57cec5SDimitry Andric 430b57cec5SDimitry Andric #endif // LLVM_AVR_MCINST_LOWER_H 44