Path: blob/main/contrib/llvm-project/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.h
35295 views
//= NVPTXInstPrinter.h - Convert NVPTX MCInst to assembly syntax --*- 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// This class prints an NVPTX MCInst to .ptx file syntax.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_NVPTX_MCTARGETDESC_NVPTXINSTPRINTER_H13#define LLVM_LIB_TARGET_NVPTX_MCTARGETDESC_NVPTXINSTPRINTER_H1415#include "llvm/MC/MCInstPrinter.h"1617namespace llvm {1819class MCSubtargetInfo;2021class NVPTXInstPrinter : public MCInstPrinter {22public:23NVPTXInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,24const MCRegisterInfo &MRI);2526void printRegName(raw_ostream &OS, MCRegister Reg) const override;27void printInst(const MCInst *MI, uint64_t Address, StringRef Annot,28const MCSubtargetInfo &STI, raw_ostream &OS) override;2930// Autogenerated by tblgen.31std::pair<const char *, uint64_t> getMnemonic(const MCInst *MI) override;32void printInstruction(const MCInst *MI, uint64_t Address, raw_ostream &O);33static const char *getRegisterName(MCRegister Reg);34// End3536void printOperand(const MCInst *MI, unsigned OpNo, raw_ostream &O);37void printCvtMode(const MCInst *MI, int OpNum, raw_ostream &O,38const char *Modifier = nullptr);39void printCmpMode(const MCInst *MI, int OpNum, raw_ostream &O,40const char *Modifier = nullptr);41void printLdStCode(const MCInst *MI, int OpNum,42raw_ostream &O, const char *Modifier = nullptr);43void printMmaCode(const MCInst *MI, int OpNum, raw_ostream &O,44const char *Modifier = nullptr);45void printMemOperand(const MCInst *MI, int OpNum,46raw_ostream &O, const char *Modifier = nullptr);47void printProtoIdent(const MCInst *MI, int OpNum,48raw_ostream &O, const char *Modifier = nullptr);49void printPrmtMode(const MCInst *MI, int OpNum, raw_ostream &O,50const char *Modifier = nullptr);51};5253}5455#endif565758