LLVM API Documentation
#include <HexagonInstPrinter.h>
Public Member Functions | |
HexagonInstPrinter (const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) | |
virtual void | printInst (const MCInst *MI, raw_ostream &O, StringRef Annot) |
void | printInst (const HexagonMCInst *MI, raw_ostream &O, StringRef Annot) |
virtual StringRef | getOpcodeName (unsigned Opcode) const |
void | printInstruction (const MCInst *MI, raw_ostream &O) |
StringRef | getRegName (unsigned RegNo) const |
void | printOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printImmOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printExtOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printUnsignedImmOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printNegImmOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printNOneImmOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printMEMriOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printFrameIndexOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printBranchOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printCallOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printAbsAddrOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printPredicateOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printGlobalOperand (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printJumpTable (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printConstantPool (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printSymbolHi (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
void | printSymbolLo (const MCInst *MI, unsigned OpNo, raw_ostream &O) const |
const MCInstrInfo & | getMII () const |
![]() | |
MCInstPrinter (const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri) | |
virtual | ~MCInstPrinter () |
void | setCommentStream (raw_ostream &OS) |
setCommentStream - Specify a stream to emit comments to. More... | |
StringRef | getOpcodeName (unsigned Opcode) const |
virtual void | printRegName (raw_ostream &OS, unsigned RegNo) const |
printRegName - Print the assembler register name. More... | |
uint64_t | getAvailableFeatures () const |
void | setAvailableFeatures (uint64_t Value) |
bool | getUseMarkup () const |
void | setUseMarkup (bool Value) |
StringRef | markup (StringRef s) const |
Utility functions to make adding mark ups simpler. More... | |
StringRef | markup (StringRef a, StringRef b) const |
bool | getPrintImmHex () const |
void | setPrintImmHex (bool Value) |
HexStyle::Style | getPrintHexStyleHex () const |
void | setPrintImmHex (HexStyle::Style Value) |
format_object1< int64_t > | formatImm (const int64_t Value) const |
Utility function to print immediates in decimal or hex. More... | |
format_object1< int64_t > | formatDec (const int64_t Value) const |
Utility functions to print decimal/hexadecimal values. More... | |
format_object1< int64_t > | formatHex (const int64_t Value) const |
format_object1< uint64_t > | formatHex (const uint64_t Value) const |
Static Public Member Functions | |
static const char * | getRegisterName (unsigned RegNo) |
Protected Member Functions | |
void | printSymbol (const MCInst *MI, unsigned OpNo, raw_ostream &O, bool hi) const |
![]() | |
void | printAnnotation (raw_ostream &OS, StringRef Annot) |
Utility function for printing annotations. More... | |
Static Protected Attributes | |
static const char | PacketPadding = '\t' |
Additional Inherited Members | |
![]() | |
raw_ostream * | CommentStream |
const MCAsmInfo & | MAI |
const MCInstrInfo & | MII |
const MCRegisterInfo & | MRI |
uint64_t | AvailableFeatures |
The current set of available features. More... | |
bool | UseMarkup |
True if we are printing marked up assembly. More... | |
bool | PrintImmHex |
True if we are printing immediates as hex. More... | |
HexStyle::Style | PrintHexStyle |
Which style to use for printing hexadecimal values. More... | |
Definition at line 23 of file HexagonInstPrinter.h.
|
inlineexplicit |
Definition at line 25 of file HexagonInstPrinter.h.
|
inline |
Definition at line 70 of file HexagonInstPrinter.h.
Definition at line 32 of file HexagonInstPrinter.cpp.
References llvm::MCInstrInfo::getName().
|
static |
Definition at line 36 of file HexagonInstPrinter.cpp.
References getRegisterName().
void HexagonInstPrinter::printAbsAddrOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 188 of file HexagonInstPrinter.cpp.
void HexagonInstPrinter::printBranchOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 177 of file HexagonInstPrinter.cpp.
References llvm_unreachable.
void HexagonInstPrinter::printCallOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 184 of file HexagonInstPrinter.cpp.
void HexagonInstPrinter::printConstantPool | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 170 of file HexagonInstPrinter.cpp.
References llvm::MCInst::getOperand(), llvm::MCOperand::isExpr(), and printOperand().
void HexagonInstPrinter::printExtOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 116 of file HexagonInstPrinter.cpp.
References llvm::HexagonMCInst::isConstExtended(), llvm::A64CC::MI, and printOperand().
void HexagonInstPrinter::printFrameIndexOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 148 of file HexagonInstPrinter.cpp.
References llvm::MCOperand::getImm(), llvm::MCInst::getOperand(), llvm::MCOperand::getReg(), and getRegisterName().
void HexagonInstPrinter::printGlobalOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 156 of file HexagonInstPrinter.cpp.
References llvm::MCInst::getOperand(), llvm::MCOperand::isExpr(), and printOperand().
void HexagonInstPrinter::printImmOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 103 of file HexagonInstPrinter.cpp.
References llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCInst::getOperand(), llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), and llvm_unreachable.
Referenced by printOperand().
|
virtual |
printInst - Print the specified MCInst to the specified raw_ostream.
Implements llvm::MCInstPrinter.
Definition at line 40 of file HexagonInstPrinter.cpp.
Referenced by printInst().
void HexagonInstPrinter::printInst | ( | const HexagonMCInst * | MI, |
raw_ostream & | O, | ||
StringRef | Annot | ||
) |
Definition at line 45 of file HexagonInstPrinter.cpp.
References llvm::MCInst::getOpcode(), llvm::HexagonMCInst::isPacketEnd(), llvm::HexagonMCInst::isPacketStart(), PacketPadding, llvm::MCInstPrinter::printAnnotation(), printInst(), printInstruction(), llvm::MCInst::setOpcode(), and llvm::HexagonMCInst::setPacketStart().
void llvm::HexagonInstPrinter::printInstruction | ( | const MCInst * | MI, |
raw_ostream & | O | ||
) |
Referenced by printInst().
void HexagonInstPrinter::printJumpTable | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 163 of file HexagonInstPrinter.cpp.
References llvm::MCInst::getOperand(), llvm::MCOperand::isExpr(), and printOperand().
void HexagonInstPrinter::printMEMriOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 139 of file HexagonInstPrinter.cpp.
References llvm::MCOperand::getImm(), llvm::MCInst::getOperand(), llvm::MCOperand::getReg(), and getRegisterName().
void HexagonInstPrinter::printNegImmOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 129 of file HexagonInstPrinter.cpp.
References llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
void HexagonInstPrinter::printNOneImmOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 134 of file HexagonInstPrinter.cpp.
void HexagonInstPrinter::printOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 88 of file HexagonInstPrinter.cpp.
References llvm::MCOperand::getExpr(), llvm::MCInst::getOperand(), llvm::MCOperand::getReg(), getRegisterName(), llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCOperand::isReg(), llvm_unreachable, and printImmOperand().
Referenced by printConstantPool(), printExtOperand(), printGlobalOperand(), printJumpTable(), and printSymbol().
void HexagonInstPrinter::printPredicateOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 192 of file HexagonInstPrinter.cpp.
|
protected |
Definition at line 196 of file HexagonInstPrinter.cpp.
References llvm::MCInst::getOperand(), llvm::MCOperand::isImm(), and printOperand().
Referenced by printSymbolHi(), and printSymbolLo().
|
inline |
Definition at line 65 of file HexagonInstPrinter.h.
References printSymbol().
|
inline |
Definition at line 67 of file HexagonInstPrinter.h.
References printSymbol().
void HexagonInstPrinter::printUnsignedImmOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) | const |
Definition at line 124 of file HexagonInstPrinter.cpp.
References llvm::MCOperand::getImm(), and llvm::MCInst::getOperand().
|
staticprotected |
Definition at line 78 of file HexagonInstPrinter.h.
Referenced by printInst().