Path: blob/main/contrib/llvm-project/llvm/lib/Target/Xtensa/XtensaAsmPrinter.h
35271 views
//===- XtensaAsmPrinter.h - Xtensa LLVM Assembly Printer --------*- 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// Xtensa Assembly printer class.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_XTENSA_XTENSAASMPRINTER_H13#define LLVM_LIB_TARGET_XTENSA_XTENSAASMPRINTER_H1415#include "XtensaTargetMachine.h"16#include "llvm/CodeGen/AsmPrinter.h"17#include "llvm/CodeGen/MachineConstantPool.h"18#include "llvm/Support/Compiler.h"1920namespace llvm {21class MCStreamer;22class MachineBasicBlock;23class MachineInstr;24class Module;25class raw_ostream;2627class LLVM_LIBRARY_VISIBILITY XtensaAsmPrinter : public AsmPrinter {28const MCSubtargetInfo *STI;2930public:31explicit XtensaAsmPrinter(TargetMachine &TM,32std::unique_ptr<MCStreamer> Streamer)33: AsmPrinter(TM, std::move(Streamer)), STI(TM.getMCSubtargetInfo()) {}3435StringRef getPassName() const override { return "Xtensa Assembly Printer"; }36void emitInstruction(const MachineInstr *MI) override;3738void emitConstantPool() override;3940void emitMachineConstantPoolEntry(const MachineConstantPoolEntry &CPE, int i);4142void emitMachineConstantPoolValue(MachineConstantPoolValue *MCPV) override;4344MCSymbol *GetConstantPoolIndexSymbol(const MachineOperand &MO) const;4546MCSymbol *GetJumpTableSymbol(const MachineOperand &MO) const;4748MCOperand LowerSymbolOperand(const MachineOperand &MO,49MachineOperand::MachineOperandType MOTy,50unsigned Offset) const;5152// Lower MachineInstr MI to MCInst OutMI.53void lowerToMCInst(const MachineInstr *MI, MCInst &OutMI) const;5455// Return an MCOperand for MO. Return an empty operand if MO is implicit.56MCOperand lowerOperand(const MachineOperand &MO, unsigned Offset = 0) const;57};58} // end namespace llvm5960#endif /* LLVM_LIB_TARGET_XTENSA_XTENSAASMPRINTER_H */616263