LLVM 20.0.0git
|
#include "Target/X86/MCTargetDesc/X86ATTInstPrinter.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 20 of file X86ATTInstPrinter.h.
|
inline |
Definition at line 22 of file X86ATTInstPrinter.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 llvm::X86ATTInstPrinter::printAliasInstr | ( | const MCInst * | MI, |
uint64_t | Address, | ||
raw_ostream & | OS | ||
) |
Referenced by printInst().
|
inline |
Definition at line 51 of file X86ATTInstPrinter.h.
References MI, and printMemReference().
void llvm::X86ATTInstPrinter::printCustomAliasOperand | ( | const MCInst * | MI, |
uint64_t | Address, | ||
unsigned | OpIdx, | ||
unsigned | PrintMethodIdx, | ||
raw_ostream & | O | ||
) |
void X86ATTInstPrinter::printDstIdx | ( | const MCInst * | MI, |
unsigned | Op, | ||
raw_ostream & | O | ||
) |
Definition at line 474 of file X86ATTInstPrinter.cpp.
References llvm::MCInstPrinter::markup(), llvm::MCInstPrinter::Memory, MI, and printOperand().
Referenced by printDstIdx16(), printDstIdx32(), printDstIdx64(), and printDstIdx8().
|
inline |
Definition at line 91 of file X86ATTInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 94 of file X86ATTInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 97 of file X86ATTInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 88 of file X86ATTInstPrinter.h.
References MI, and printDstIdx().
|
inline |
Definition at line 57 of file X86ATTInstPrinter.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 42 of file X86ATTInstPrinter.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(), llvm::X86InstPrinterCommon::printPCRelImm(), and printVecCompareInstr().
void llvm::X86ATTInstPrinter::printInstruction | ( | const MCInst * | MI, |
uint64_t | Address, | ||
raw_ostream & | OS | ||
) |
Referenced by printInst().
|
inline |
Definition at line 103 of file X86ATTInstPrinter.h.
References MI, and printMemOffset().
|
inline |
Definition at line 106 of file X86ATTInstPrinter.h.
References MI, and printMemOffset().
|
inline |
Definition at line 109 of file X86ATTInstPrinter.h.
References MI, and printMemOffset().
|
inline |
Definition at line 100 of file X86ATTInstPrinter.h.
References MI, and printMemOffset().
void X86ATTInstPrinter::printMemOffset | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | OS | ||
) |
Definition at line 483 of file X86ATTInstPrinter.cpp.
References assert(), llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), 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 X86ATTInstPrinter::printMemReference | ( | const MCInst * | MI, |
unsigned | Op, | ||
raw_ostream & | OS | ||
) |
Definition at line 414 of file X86ATTInstPrinter.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 381 of file X86ATTInstPrinter.cpp.
References assert(), llvm::MCInstPrinter::CommentStream, llvm::format(), llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), MI, llvm::DWARFExpression::Operation::print(), and printRegName().
Referenced by printDstIdx(), printMemReference(), printSrcIdx(), printU8Imm(), and printVecCompareInstr().
|
inline |
Definition at line 60 of file X86ATTInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
overridevirtual |
Print the assembler register name.
Reimplemented from llvm::MCInstPrinter.
Definition at line 38 of file X86ATTInstPrinter.cpp.
References getRegisterName(), llvm::MCInstPrinter::markup(), OS, and llvm::MCInstPrinter::Register.
Referenced by printOperand(), and printSTiRegOperand().
void X86ATTInstPrinter::printSrcIdx | ( | const MCInst * | MI, |
unsigned | Op, | ||
raw_ostream & | O | ||
) |
Definition at line 462 of file X86ATTInstPrinter.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 79 of file X86ATTInstPrinter.h.
References MI, and printSrcIdx().
|
inline |
Definition at line 82 of file X86ATTInstPrinter.h.
References MI, and printSrcIdx().
|
inline |
Definition at line 85 of file X86ATTInstPrinter.h.
References MI, and printSrcIdx().
|
inline |
Definition at line 76 of file X86ATTInstPrinter.h.
References MI, and printSrcIdx().
void X86ATTInstPrinter::printSTiRegOperand | ( | const MCInst * | MI, |
unsigned | OpNo, | ||
raw_ostream & | OS | ||
) |
Definition at line 509 of file X86ATTInstPrinter.cpp.
References llvm::MCInstPrinter::markup(), MI, OS, printRegName(), and llvm::MCInstPrinter::Register.
|
inline |
Definition at line 72 of file X86ATTInstPrinter.h.
References MI, and printMemReference().
void X86ATTInstPrinter::printU8Imm | ( | const MCInst * | MI, |
unsigned | Op, | ||
raw_ostream & | OS | ||
) |
Definition at line 500 of file X86ATTInstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, and printOperand().
bool X86ATTInstPrinter::printVecCompareInstr | ( | const MCInst * | MI, |
raw_ostream & | OS | ||
) |
Definition at line 79 of file X86ATTInstPrinter.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 54 of file X86ATTInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
inline |
Definition at line 63 of file X86ATTInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
inline |
Definition at line 66 of file X86ATTInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().
|
inline |
Definition at line 69 of file X86ATTInstPrinter.h.
References MI, and printMemReference().
Referenced by printVecCompareInstr().