LLVM 20.0.0git
|
#include "Target/Sparc/MCTargetDesc/SparcInstPrinter.h"
Static Public Member Functions | |
static const char * | getRegisterName (MCRegister Reg, unsigned AltIdx=SP::NoRegAltName) |
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 SparcInstPrinter.h.
|
inline |
Definition at line 23 of file SparcInstPrinter.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.
|
static |
bool SparcInstPrinter::isV9 | ( | const MCSubtargetInfo & | STI | ) | const |
Definition at line 36 of file SparcInstPrinter.cpp.
References llvm::MCSubtargetInfo::hasFeature().
Referenced by printASITag(), printOperand(), and printSparcAliasInstr().
bool llvm::SparcInstPrinter::printAliasInstr | ( | const MCInst * | MI, |
uint64_t | Address, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | O | ||
) |
Referenced by printInst().
void SparcInstPrinter::printASITag | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | O | ||
) |
Definition at line 246 of file SparcInstPrinter.cpp.
void SparcInstPrinter::printCCOperand | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 173 of file SparcInstPrinter.cpp.
References CC, llvm::SPCC::CPCC_BEGIN, llvm::SPCC::FCC_BEGIN, MI, llvm::SPCC::REG_BEGIN, and llvm::SPARCCondCodeToString().
void llvm::SparcInstPrinter::printCustomAliasOperand | ( | const MCInst * | MI, |
uint64_t | Address, | ||
unsigned | OpIdx, | ||
unsigned | PrintMethodIdx, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | O | ||
) |
bool SparcInstPrinter::printGetPCX | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 216 of file SparcInstPrinter.cpp.
References llvm_unreachable.
|
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 49 of file SparcInstPrinter.cpp.
References llvm::Address, MI, printAliasInstr(), llvm::MCInstPrinter::printAnnotation(), printInstruction(), and printSparcAliasInstr().
void llvm::SparcInstPrinter::printInstruction | ( | const MCInst * | MI, |
uint64_t | Address, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | O | ||
) |
Referenced by printInst().
void SparcInstPrinter::printMembarTag | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | O | ||
) |
Definition at line 223 of file SparcInstPrinter.cpp.
References llvm::First, and MI.
void SparcInstPrinter::printMemOperand | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 148 of file SparcInstPrinter.cpp.
References llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), MI, and printOperand().
Referenced by printSparcAliasInstr().
void SparcInstPrinter::printOperand | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 112 of file SparcInstPrinter.cpp.
References assert(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), isV9(), llvm::MCInstPrinter::MAI, MI, llvm::MCExpr::print(), and printRegName().
Referenced by printMemOperand(), and printSparcAliasInstr().
void SparcInstPrinter::printPrefetchTag | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | O | ||
) |
Definition at line 256 of file SparcInstPrinter.cpp.
References MI.
|
overridevirtual |
Print the assembler register name.
Reimplemented from llvm::MCInstPrinter.
Definition at line 40 of file SparcInstPrinter.cpp.
References getRegisterName(), and OS.
Referenced by printOperand().
void SparcInstPrinter::printRegName | ( | raw_ostream & | OS, |
MCRegister | Reg, | ||
unsigned | AltIdx | ||
) | const |
Definition at line 44 of file SparcInstPrinter.cpp.
References getRegisterName(), and OS.
bool SparcInstPrinter::printSparcAliasInstr | ( | const MCInst * | MI, |
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 58 of file SparcInstPrinter.cpp.
References isV9(), MI, printMemOperand(), and printOperand().
Referenced by printInst().