|
LLVM 22.0.0git
|
#include "Target/SPIRV/MCTargetDesc/SPIRVInstPrinter.h"
Static Public Member Functions | |
| static const char * | getRegisterName (MCRegister Reg) |
Additional Inherited Members | |
| Public Types inherited from llvm::MCInstPrinter | |
| enum class | Markup { Immediate , Register , Target , Memory } |
| Protected Member Functions inherited from llvm::MCInstPrinter | |
| void | printAnnotation (raw_ostream &OS, StringRef Annot) |
| Utility function for printing annotations. | |
| const char * | matchAliasPatterns (const MCInst *MI, const MCSubtargetInfo *STI, const AliasMatchingData &M) |
| Helper for matching MCInsts to alias patterns when printing instructions. | |
| Protected Attributes inherited from llvm::MCInstPrinter | |
| raw_ostream * | CommentStream = nullptr |
| A stream that comments can be emitted to if desired. | |
| const MCAsmInfo & | MAI |
| const MCInstrInfo & | MII |
| const MCRegisterInfo & | MRI |
| const MCInstrAnalysis * | MIA = nullptr |
| bool | UseMarkup = false |
| True if we are printing marked up assembly. | |
| bool | UseColor = false |
| True if we are printing colored assembly. | |
| bool | PrintAliases = true |
| True if we prefer aliases (e.g. nop) to raw mnemonics. | |
| bool | PrintImmHex = false |
| True if we are printing immediates as hex. | |
| HexStyle::Style | PrintHexStyle = HexStyle::C |
| Which style to use for printing hexadecimal values. | |
| bool | PrintBranchImmAsAddress = false |
| If true, a branch immediate (e.g. | |
| bool | SymbolizeOperands = false |
| If true, symbolize branch target and memory reference operands. | |
| SmallVector< raw_ostream::Colors, 4 > | ColorStack {raw_ostream::Colors::RESET} |
Definition at line 21 of file SPIRVInstPrinter.h.
|
overridevirtual |
Returns a pair containing the mnemonic for MI and the number of bits left for further processing by printInstruction (generated by tablegen).
Implements llvm::MCInstPrinter.
References MI.
|
static |
References Reg.
|
inline |
Definition at line 90 of file MCInstPrinter.h.
| void SPIRVInstPrinter::printExtension | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 462 of file SPIRVInstPrinter.cpp.
References llvm::getExtInstName(), and MI.
|
overridevirtual |
Print the specified MCInst to the specified raw_ostream.
Address the address of current instruction on most targets, used to print a PC relative immediate as the target address. On targets where a PC relative immediate is relative to the next instruction and the length of a MCInst is difficult to measure (e.g. x86), this is the address of the next instruction. If Address is 0, the immediate will be printed.
Implements llvm::MCInstPrinter.
Definition at line 103 of file SPIRVInstPrinter.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, llvm::Address, assert(), llvm::MCInstrDesc::getNumOperands(), llvm::getSymbolicOperandMnemonic(), llvm::MCInstrDesc::isVariadic(), MI, llvm::MCInstPrinter::MII, llvm::MCOI::OPERAND_UNKNOWN, llvm::MCInstrDesc::operands(), llvm::MCInstPrinter::printAnnotation(), printInstruction(), printOpConstantVarOps(), printOpDecorate(), printOperand(), printOpExtInst(), printRemainingVariableOps(), printSymbolicOperand(), and printUnknownType().
| void llvm::SPIRVInstPrinter::printInstruction | ( | const MCInst * | MI, |
| uint64_t | Address, | ||
| raw_ostream & | O ) |
References llvm::Address, and MI.
Referenced by printInst().
| void SPIRVInstPrinter::printOpConstantVarOps | ( | const MCInst * | MI, |
| unsigned | StartIndex, | ||
| raw_ostream & | O ) |
Definition at line 47 of file SPIRVInstPrinter.cpp.
References assert(), llvm::format(), FP, llvm::getImm(), llvm::SPIRV::INST_PRINTER_WIDTH16, and MI.
Referenced by printInst().
| void SPIRVInstPrinter::printOpDecorate | ( | const MCInst * | MI, |
| raw_ostream & | O ) |
Definition at line 324 of file SPIRVInstPrinter.cpp.
References llvm::MCInstrDesc::getNumOperands(), MI, llvm::MCInstPrinter::MII, printOperand(), printRemainingVariableOps(), printStringImm(), and printSymbolicOperand().
Referenced by printInst().
| void SPIRVInstPrinter::printOperand | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 398 of file SPIRVInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::SPIRV::getIDFromRegister(), llvm_unreachable, llvm::MCInstPrinter::MAI, and MI.
Referenced by printInst(), printOpDecorate(), printRemainingVariableOps(), and printUnknownType().
| void SPIRVInstPrinter::printOpExtInst | ( | const MCInst * | MI, |
| raw_ostream & | O ) |
Definition at line 309 of file SPIRVInstPrinter.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, llvm::MCInstrDesc::getNumOperands(), MI, llvm::MCInstPrinter::MII, and printRemainingVariableOps().
Referenced by printInst().
| void SPIRVInstPrinter::printRemainingVariableOps | ( | const MCInst * | MI, |
| unsigned | StartIndex, | ||
| raw_ostream & | O, | ||
| bool | SkipFirstSpace = false, | ||
| bool | SkipImmediates = false ) |
Definition at line 32 of file SPIRVInstPrinter.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, MI, and printOperand().
Referenced by printInst(), printOpDecorate(), printOpExtInst(), and printUnknownType().
| void SPIRVInstPrinter::printStringImm | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 423 of file SPIRVInstPrinter.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, llvm::getSPIRVStringOperand(), MI, and printSymbolicOperand().
Referenced by printOpDecorate().
| void SPIRVInstPrinter::printSymbolicOperand | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 471 of file SPIRVInstPrinter.cpp.
References llvm::getSymbolicOperandMnemonic(), and MI.
Referenced by printInst(), printOpDecorate(), and printStringImm().
| void SPIRVInstPrinter::printUnknownType | ( | const MCInst * | MI, |
| raw_ostream & | O ) |
Definition at line 373 of file SPIRVInstPrinter.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, assert(), llvm::MCInstrDesc::getNumOperands(), MI, llvm::MCInstPrinter::MII, printOperand(), and printRemainingVariableOps().
Referenced by printInst().