|
LLVM 24.0.0git
|
#include "Target/PISA/MCTargetDesc/PISAInstPrinter.h"
Classes | |
| struct | MemSeqOperandPrinter |
Public Types | |
| typedef std::function< void(const MCInst *, unsigned, raw_ostream &)> | printOpndFn |
| Public Types inherited from llvm::MCInstPrinter | |
| enum class | Markup { Immediate , Register , Target , Memory } |
Static Public Member Functions | |
| static const char * | getRegisterName (MCRegister Reg) |
| static void | printSymbolName (raw_ostream &OS, StringRef Name, const MCAsmInfo *MAI) |
Additional Inherited Members | |
| 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 22 of file PISAInstPrinter.h.
| typedef std::function<void(const MCInst *, unsigned, raw_ostream &)> llvm::PISAInstPrinter::printOpndFn |
Definition at line 27 of file PISAInstPrinter.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 llvm::MCInstPrinter::MAI, MI, and Reg.
Referenced by printRegName().
|
inline |
Definition at line 90 of file MCInstPrinter.h.
| void PISAInstPrinter::negateRepr | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 193 of file PISAInstPrinter.cpp.
References MI.
| void PISAInstPrinter::printAddrOffsetImm | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 243 of file PISAInstPrinter.cpp.
References llvm::format(), llvm::MCInstPrinter::formatImm(), and MI.
| bool llvm::PISAInstPrinter::printAliasInstr | ( | const MCInst * | MI, |
| uint64_t | Address, | ||
| raw_ostream & | OS ) |
References llvm::Address, MI, and uint64_t.
| void PISAInstPrinter::printBfnOpcode | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 257 of file PISAInstPrinter.cpp.
References llvm::format_hex(), and MI.
| PISAInstPrinter::printOpndFn PISAInstPrinter::printBoolOptionOpnd | ( | PISA::BoolOptionID | OptID | ) |
Definition at line 413 of file PISAInstPrinter.cpp.
References llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
| void PISAInstPrinter::printBrTargetOpnd | ( | const MCInst * | MCI, |
| uint64_t | Address, | ||
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 129 of file PISAInstPrinter.cpp.
References llvm::Address, llvm::MCOperand::getExpr(), llvm::MCInst::getOperand(), and llvm::MCInstPrinter::MAI.
| void llvm::PISAInstPrinter::printCustomAliasOperand | ( | const MCInst * | MI, |
| uint64_t | Address, | ||
| unsigned | OpIdx, | ||
| unsigned | PrintMethodIdx, | ||
| raw_ostream & | OS ) |
References llvm::Address, MI, Reg, and uint64_t.
| void llvm::PISAInstPrinter::printEnumOption | ( | PISA::EnumOptionClass | OptClass, |
| bool | IsMandatoryField, | ||
| unsigned | DefaultVal, | ||
| const MCInst * | MCI, | ||
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Referenced by printEnumOption().
|
inline |
Definition at line 43 of file PISAInstPrinter.h.
References printEnumOption().
| void PISAInstPrinter::printFpImm16Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 104 of file PISAInstPrinter.cpp.
References llvm::format_hex(), llvm::MCOperand::getHFPImm(), and llvm::MCInst::getOperand().
| void PISAInstPrinter::printFpImm32Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 110 of file PISAInstPrinter.cpp.
References llvm::format_hex(), llvm::MCInst::getOperand(), and llvm::MCOperand::getSFPImm().
Referenced by printOperand().
| void PISAInstPrinter::printFpImm64Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 116 of file PISAInstPrinter.cpp.
References llvm::format_hex(), llvm::MCOperand::getDFPImm(), and llvm::MCInst::getOperand().
Referenced by printOperand().
| void PISAInstPrinter::printFunctionCallTargetOpnd | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 228 of file PISAInstPrinter.cpp.
References MI, and printOperand().
| void PISAInstPrinter::printGlobalVariableOpnd | ( | const MCInst * | MCI, |
| uint64_t | Address, | ||
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 141 of file PISAInstPrinter.cpp.
References llvm::Address, llvm::MCOperand::getExpr(), llvm::MCInst::getOperand(), and llvm::MCInstPrinter::MAI.
| void PISAInstPrinter::printImm128Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 98 of file PISAInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
| void PISAInstPrinter::printImm16Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 80 of file PISAInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
| void PISAInstPrinter::printImm1Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 68 of file PISAInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
| void PISAInstPrinter::printImm32Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 86 of file PISAInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
| void PISAInstPrinter::printImm64Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 92 of file PISAInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
| void PISAInstPrinter::printImm8Opnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 74 of file PISAInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
|
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 48 of file PISAInstPrinter.cpp.
References llvm::Address, MI, llvm::MCInstPrinter::printAnnotation(), and printInstruction().
| void llvm::PISAInstPrinter::printInstruction | ( | const MCInst * | MI, |
| uint64_t | Address, | ||
| raw_ostream & | O ) |
References llvm::Address, MI, and uint64_t.
Referenced by printInst().
| void PISAInstPrinter::printLocalVariableOpnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 135 of file PISAInstPrinter.cpp.
References assert(), llvm::PISAMCInstLower::isVariableRef(), and printOperand().
| void PISAInstPrinter::printMemOperand | ( | const MCInst * | MI, |
| int | OpNo, | ||
| raw_ostream & | O, | ||
| const char * | Modifier = nullptr ) |
Definition at line 287 of file PISAInstPrinter.cpp.
References assert(), llvm::format(), llvm::MCInstPrinter::formatImm(), MI, printOperand(), and printRegName().
| void PISAInstPrinter::printMemScopeOpnd | ( | const MCInst * | MCI, |
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 148 of file PISAInstPrinter.cpp.
References assert(), llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
|
inline |
Definition at line 95 of file PISAInstPrinter.h.
| void PISAInstPrinter::printMemSeqOperand | ( | StringRef | Pattern, |
| const MCInst * | MI, | ||
| int | OpNo, | ||
| raw_ostream & | OS, | ||
| const char * | Modifier ) |
Definition at line 313 of file PISAInstPrinter.cpp.
References C(), MI, and printOperand().
| void PISAInstPrinter::printOperand | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O, | ||
| const char * | Modifier = nullptr ) |
Definition at line 168 of file PISAInstPrinter.cpp.
References assert(), llvm::MCInstPrinter::formatImm(), llvm::PISAMCInstLower::isVariableRef(), llvm_unreachable, llvm::MCInstPrinter::MAI, MI, printFpImm32Opnd(), printFpImm64Opnd(), and printRegName().
Referenced by printFunctionCallTargetOpnd(), printLocalVariableOpnd(), printMemOperand(), and printMemSeqOperand().
| void PISAInstPrinter::printParamMemOperand | ( | const MCInst * | MI, |
| int | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 336 of file PISAInstPrinter.cpp.
References assert(), llvm::cast(), llvm::format(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCSymbol::getName(), llvm::MCInst::getOperand(), llvm::MCSymbolRefExpr::getSymbol(), llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::Offset, and printRegName().
|
overridevirtual |
Print the assembler register name.
Reimplemented from llvm::MCInstPrinter.
Definition at line 58 of file PISAInstPrinter.cpp.
References llvm::PISA::RegEncoder::decodeVirtualRegister(), and getRegisterName().
Referenced by printMemOperand(), printOperand(), printParamMemOperand(), and printRegOpnd().
|
inline |
Definition at line 63 of file PISAInstPrinter.h.
References printRegOpnd().
| void PISAInstPrinter::printRegOpnd | ( | unsigned | RCID, |
| const MCInst * | MCI, | ||
| unsigned | OpNo, | ||
| raw_ostream & | OS ) |
Definition at line 122 of file PISAInstPrinter.cpp.
References llvm::MCInst::getOperand(), llvm::MCOperand::getReg(), and printRegName().
Referenced by printRegOpnd().
| void PISAInstPrinter::printStringImm | ( | const MCInst * | MI, |
| unsigned | OpNo, | ||
| raw_ostream & | O ) |
Definition at line 263 of file PISAInstPrinter.cpp.
References AbstractManglingParser< Derived, Alloc >::NumOps, C(), llvm::getPISAStringOperand(), and MI.
|
static |
Definition at line 366 of file PISAInstPrinter.cpp.
References C(), llvm::hexdigit(), llvm::isPrint(), llvm::MCInstPrinter::MAI, and llvm::report_fatal_error().
Referenced by llvm::PISAGlobalAddressMCExpr::printImpl().