LLVM
15.0.0git
|
#include "Target/Sparc/MCTargetDesc/SparcInstPrinter.h"
Static Public Member Functions | |
static const char * | getRegisterName (unsigned RegNo) |
Additional Inherited Members | |
![]() | |
void | printAnnotation (raw_ostream &OS, StringRef Annot) |
Utility function for printing annotations. More... | |
const char * | matchAliasPatterns (const MCInst *MI, const MCSubtargetInfo *STI, const AliasMatchingData &M) |
Helper for matching MCInsts to alias patterns when printing instructions. More... | |
![]() | |
raw_ostream * | CommentStream = nullptr |
A stream that comments can be emitted to if desired. More... | |
const MCAsmInfo & | MAI |
const MCInstrInfo & | MII |
const MCRegisterInfo & | MRI |
const MCInstrAnalysis * | MIA = nullptr |
bool | UseMarkup = false |
True if we are printing marked up assembly. More... | |
bool | PrintAliases = true |
True if we prefer aliases (e.g. nop) to raw mnemonics. More... | |
bool | PrintImmHex = false |
True if we are printing immediates as hex. More... | |
HexStyle::Style | PrintHexStyle = HexStyle::C |
Which style to use for printing hexadecimal values. More... | |
bool | PrintBranchImmAsAddress = false |
If true, a branch immediate (e.g. More... | |
bool | SymbolizeOperands = false |
If true, symbolize branch target and memory reference operands. More... | |
Definition at line 20 of file SparcInstPrinter.h.
|
inline |
Definition at line 22 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 37 of file SparcInstPrinter.cpp.
References llvm::MCSubtargetInfo::getFeatureBits().
Referenced by printSparcAliasInstr().
bool llvm::SparcInstPrinter::printAliasInstr | ( | const MCInst * | MI, |
uint64_t | Address, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | O | ||
) |
Referenced by printInst().
void SparcInstPrinter::printCCOperand | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 174 of file SparcInstPrinter.cpp.
References int, MI, llvm::RISCVFenceField::O, 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 203 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 46 of file SparcInstPrinter.cpp.
References MI, llvm::RISCVFenceField::O, 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 210 of file SparcInstPrinter.cpp.
References First, i, llvm::RISCVMatInt::Imm, MI, and llvm::RISCVFenceField::O.
void SparcInstPrinter::printMemOperand | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS, | ||
const char * | Modifier = nullptr |
||
) |
Definition at line 141 of file SparcInstPrinter.cpp.
References llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), MI, llvm::RISCVFenceField::O, and printOperand().
Referenced by printSparcAliasInstr().
void SparcInstPrinter::printOperand | ( | const MCInst * | MI, |
int | opNum, | ||
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 109 of file SparcInstPrinter.cpp.
References assert(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), int, llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), llvm::MCInstPrinter::MAI, MI, llvm::RISCVFenceField::O, llvm::MCExpr::print(), printRegName(), and return.
Referenced by printMemOperand(), and printSparcAliasInstr().
|
overridevirtual |
Print the assembler register name.
Reimplemented from llvm::MCInstPrinter.
Definition at line 41 of file SparcInstPrinter.cpp.
References getRegisterName(), and llvm::StringRef::lower().
Referenced by printOperand().
bool SparcInstPrinter::printSparcAliasInstr | ( | const MCInst * | MI, |
const MCSubtargetInfo & | STI, | ||
raw_ostream & | OS | ||
) |
Definition at line 55 of file SparcInstPrinter.cpp.
References isV9(), MI, llvm::RISCVFenceField::O, printMemOperand(), and printOperand().
Referenced by printInst().