LLVM 20.0.0git
|
#include "Target/X86/MCTargetDesc/X86IntelInstPrinter.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::X86InstPrinterCommon | |
void | printInstFlags (const MCInst *MI, raw_ostream &O, const MCSubtargetInfo &STI) |
void | printOptionalSegReg (const MCInst *MI, unsigned OpNo, raw_ostream &O) |
void | printVKPair (const MCInst *MI, unsigned OpNo, raw_ostream &OS) |
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. | |
Definition at line 21 of file X86IntelInstPrinter.h.
|
inline |
Definition at line 23 of file X86IntelInstPrinter.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 |
Referenced by llvm::X86Operand::print(), and printRegName().
bool llvm::X86IntelInstPrinter::printAliasInstr | ( | const MCInst * | MI, |
uint64_t | Address, | ||
raw_ostream & | OS | ||
) |
Referenced by printInst().
|
inline |
Definition at line 52 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
void llvm::X86IntelInstPrinter::printCustomAliasOperand | ( | const MCInst * | MI, |
uint64_t | Address, | ||
unsigned | OpIdx, | ||
unsigned | PrintMethodIdx, | ||
raw_ostream & | O | ||
) |
void X86IntelInstPrinter::printDstIdx | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 441 of file X86IntelInstPrinter.cpp.
References llvm::MCInstPrinter::markup(), llvm::MCInstPrinter::Memory, MI, and printOperand().
Referenced by printDstIdx16(), printDstIdx32(), printDstIdx64(), and printDstIdx8().
|
inline |
Definition at line 106 of file X86IntelInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 110 of file X86IntelInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 114 of file X86IntelInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 102 of file X86IntelInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 60 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
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 40 of file X86IntelInstPrinter.cpp.
References llvm::Address, llvm::MCInstPrinter::CommentStream, llvm::EmitAnyX86InstComments(), llvm::MCSubtargetInfo::hasFeature(), MI, llvm::MCInstPrinter::MII, OS, printAliasInstr(), llvm::MCInstPrinter::printAnnotation(), llvm::X86InstPrinterCommon::printInstFlags(), printInstruction(), and printVecCompareInstr().
void llvm::X86IntelInstPrinter::printInstruction | ( | const MCInst * | MI, |
uint64_t | Address, | ||
raw_ostream & | O | ||
) |
Referenced by printInst().
|
inline |
Definition at line 122 of file X86IntelInstPrinter.h.
References MI, and printMemOffset().
|
inline |
Definition at line 126 of file X86IntelInstPrinter.h.
References MI, and printMemOffset().
|
inline |
Definition at line 130 of file X86IntelInstPrinter.h.
References MI, and printMemOffset().
|
inline |
Definition at line 118 of file X86IntelInstPrinter.h.
References MI, and printMemOffset().
void X86IntelInstPrinter::printMemOffset | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 452 of file X86IntelInstPrinter.cpp.
References assert(), llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCInstPrinter::Immediate, llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), llvm::MCInstPrinter::Memory, MI, llvm::MCExpr::print(), and llvm::X86InstPrinterCommon::printOptionalSegReg().
Referenced by printMemOffs16(), printMemOffs32(), printMemOffs64(), and printMemOffs8().
void X86IntelInstPrinter::printMemReference | ( | const MCInst * | MI, |
unsigned | Op, | ||
raw_ostream & | O | ||
) |
Definition at line 372 of file X86IntelInstPrinter.cpp.
References llvm::X86::AddrBaseReg, llvm::X86::AddrDisp, llvm::X86::AddrIndexReg, llvm::X86::AddrScaleAmt, llvm::X86::AddrSegmentReg, assert(), llvm::MCInstrAnalysis::evaluateBranch(), llvm::MCInstrAnalysis::evaluateMemoryOperandAddress(), llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), llvm::MCInstPrinter::Immediate, llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), llvm::MCInstPrinter::Memory, MI, llvm::MCInstPrinter::MIA, llvm::MCExpr::print(), printOperand(), llvm::X86InstPrinterCommon::printOptionalSegReg(), and llvm::MCInstPrinter::SymbolizeOperands.
Referenced by printbytemem(), printdwordmem(), printqwordmem(), printtbytemem(), printwordmem(), printxmmwordmem(), printymmwordmem(), and printzmmwordmem().
|
overridevirtual |
Implements llvm::X86InstPrinterCommon.
Definition at line 358 of file X86IntelInstPrinter.cpp.
References assert(), llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), MI, llvm::DWARFExpression::Operation::print(), and printRegName().
Referenced by printDstIdx(), printMemReference(), printSrcIdx(), and printVecCompareInstr().
|
inline |
Definition at line 64 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
overridevirtual |
Print the assembler register name.
Reimplemented from llvm::MCInstPrinter.
Definition at line 36 of file X86IntelInstPrinter.cpp.
References getRegisterName(), llvm::MCInstPrinter::markup(), OS, and llvm::MCInstPrinter::Register.
Referenced by printOperand(), and printSTiRegOperand().
void X86IntelInstPrinter::printSrcIdx | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | O | ||
) |
Definition at line 430 of file X86IntelInstPrinter.cpp.
References llvm::MCInstPrinter::markup(), llvm::MCInstPrinter::Memory, MI, printOperand(), and llvm::X86InstPrinterCommon::printOptionalSegReg().
Referenced by printSrcIdx16(), printSrcIdx32(), printSrcIdx64(), and printSrcIdx8().
|
inline |
Definition at line 90 of file X86IntelInstPrinter.h.
References MI, and printSrcIdx().
|
inline |
Definition at line 94 of file X86IntelInstPrinter.h.
References MI, and printSrcIdx().
|
inline |
Definition at line 98 of file X86IntelInstPrinter.h.
References MI, and printSrcIdx().
|
inline |
Definition at line 86 of file X86IntelInstPrinter.h.
References MI, and printSrcIdx().
void X86IntelInstPrinter::printSTiRegOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | OS | ||
) |
Definition at line 480 of file X86IntelInstPrinter.cpp.
References MI, OS, and printRegName().
|
inline |
Definition at line 80 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
void X86IntelInstPrinter::printU8Imm | ( | const MCInst * | MI, |
unsigned | Op, | ||
raw_ostream & | O | ||
) |
Definition at line 472 of file X86IntelInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), MI, and llvm::Pass::print().
bool X86IntelInstPrinter::printVecCompareInstr | ( | const MCInst * | MI, |
raw_ostream & | OS | ||
) |
Definition at line 60 of file X86IntelInstPrinter.cpp.
References assert(), llvm::X86II::EVEX_B, llvm::X86II::EVEX_K, llvm::X86II::EVEX_L2, llvm::X86II::FormMask, llvm::MCInstrInfo::get(), MI, llvm::MCInstPrinter::MII, llvm::X86II::MRMSrcMem, llvm::X86II::OpMapMask, llvm::X86II::OpPrefixMask, OS, llvm::X86InstPrinterCommon::printCMPMnemonic(), printdwordmem(), printOperand(), printqwordmem(), llvm::X86InstPrinterCommon::printVPCMPMnemonic(), llvm::X86InstPrinterCommon::printVPCOMMnemonic(), printwordmem(), printxmmwordmem(), printymmwordmem(), printzmmwordmem(), llvm::X86II::REX_W, llvm::X86II::TA, llvm::X86II::VEX_L, llvm::X86II::XD, and llvm::X86II::XS.
Referenced by printInst().
|
inline |
Definition at line 56 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
inline |
Definition at line 68 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
inline |
Definition at line 72 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
inline |
Definition at line 76 of file X86IntelInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().