LLVM: llvm::X86ATTInstPrinter Class Reference (original) (raw)

#include "[Target/X86/MCTargetDesc/X86ATTInstPrinter.h](X86ATTInstPrinter%5F8h%5Fsource.html)"

Public Member Functions
X86ATTInstPrinter (const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI)
void printExprOperand (raw_ostream &OS, const MCExpr &E) override
void printRegName (raw_ostream &OS, MCRegister Reg) override
Print the assembler register name.
void printInst (const MCInst *MI, uint64_t Address, StringRef Annot, const MCSubtargetInfo &STI, raw_ostream &OS) override
Print the specified MCInst to the specified raw_ostream.
bool printVecCompareInstr (const MCInst *MI, raw_ostream &OS)
bool printAliasInstr (const MCInst *MI, uint64_t Address, raw_ostream &OS)
void printCustomAliasOperand (const MCInst *MI, uint64_t Address, unsigned OpIdx, unsigned PrintMethodIdx, raw_ostream &O)
std::pair< const char *, uint64_t > getMnemonic (const MCInst &MI) const override
Returns a pair containing the mnemonic for MI and the number of bits left for further processing by printInstruction (generated by tablegen).
void printInstruction (const MCInst *MI, uint64_t Address, raw_ostream &OS)
void printOperand (const MCInst *MI, unsigned OpNo, raw_ostream &OS) override
void printMemReference (const MCInst *MI, unsigned Op, raw_ostream &OS)
void printMemOffset (const MCInst *MI, unsigned OpNo, raw_ostream &OS)
void printSrcIdx (const MCInst *MI, unsigned Op, raw_ostream &O)
void printDstIdx (const MCInst *MI, unsigned Op, raw_ostream &O)
void printU8Imm (const MCInst *MI, unsigned Op, raw_ostream &OS)
void printSTiRegOperand (const MCInst *MI, unsigned OpNo, raw_ostream &OS)
void printbytemem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printwordmem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printdwordmem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printqwordmem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printxmmwordmem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printymmwordmem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printzmmwordmem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printtbytemem (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printSrcIdx8 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printSrcIdx16 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printSrcIdx32 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printSrcIdx64 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printDstIdx8 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printDstIdx16 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printDstIdx32 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printDstIdx64 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printMemOffs8 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printMemOffs16 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printMemOffs32 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
void printMemOffs64 (const MCInst *MI, unsigned OpNo, raw_ostream &O)
Public Member Functions inherited from llvm::X86InstPrinterCommon
void printCondCode (const MCInst *MI, unsigned Op, raw_ostream &OS)
void printCondFlags (const MCInst *MI, unsigned Op, raw_ostream &OS)
void printSSEAVXCC (const MCInst *MI, unsigned Op, raw_ostream &OS)
void printVPCOMMnemonic (const MCInst *MI, raw_ostream &OS)
void printVPCMPMnemonic (const MCInst *MI, raw_ostream &OS)
void printCMPMnemonic (const MCInst *MI, bool IsVCmp, raw_ostream &OS)
void printRoundingControl (const MCInst *MI, unsigned Op, raw_ostream &O)
void printPCRelImm (const MCInst *MI, uint64_t Address, unsigned OpNo, raw_ostream &O)
value (e.g.
MCInstPrinter (const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri)
Public Member Functions inherited from llvm::MCInstPrinter
MCInstPrinter (const MCAsmInfo &mai, const MCInstrInfo &mii, const MCRegisterInfo &mri)
virtual ~MCInstPrinter ()
virtual bool applyTargetSpecificCLOption (StringRef Opt)
Customize the printer according to a command line option.
void setCommentStream (raw_ostream &OS)
Specify a stream to emit comments to.
StringRef getOpcodeName (unsigned Opcode) const
Return the name of the specified opcode enum (e.g.
bool getUseMarkup () const
void setUseMarkup (bool Value)
bool getUseColor () const
void setUseColor (bool Value)
WithMarkup markup (raw_ostream &OS, Markup M)
bool getPrintImmHex () const
void setPrintImmHex (bool Value)
void setPrintHexStyle (HexStyle::Style Value)
void setPrintBranchImmAsAddress (bool Value)
void setSymbolizeOperands (bool Value)
void setMCInstrAnalysis (const MCInstrAnalysis *Value)
format_object< int64_t > formatImm (int64_t Value) const
Utility function to print immediates in decimal or hex.
format_object< int64_t > formatDec (int64_t Value) const
Utility functions to print decimal/hexadecimal values.
format_object< int64_t > formatHex (int64_t Value) const
format_object< uint64_t > formatHex (uint64_t Value) const
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.
SmallVector< raw_ostream::Colors, 4 > ColorStack {raw_ostream::Colors::RESET}

Definition at line 20 of file X86ATTInstPrinter.h.

getMnemonic()

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.

References MI.

getRegisterName()

printAliasInstr()

printbytemem()

printCustomAliasOperand()

printDstIdx()

printDstIdx16()

printDstIdx32()

printDstIdx64()

printDstIdx8()

printdwordmem()

printExprOperand()

printInst()

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 58 of file X86ATTInstPrinter.cpp.

References llvm::Address, llvm::MCInstPrinter::CommentStream, llvm::EmitAnyX86InstComments(), llvm::MCSubtargetInfo::hasFeature(), MI, llvm::MCInstPrinter::MII, printAliasInstr(), llvm::MCInstPrinter::printAnnotation(), llvm::X86InstPrinterCommon::printInstFlags(), printInstruction(), llvm::X86InstPrinterCommon::printPCRelImm(), and printVecCompareInstr().

printInstruction()

printMemOffs16()

printMemOffs32()

printMemOffs64()

printMemOffs8()

printMemOffset()

Definition at line 507 of file X86ATTInstPrinter.cpp.

References assert(), llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCInstPrinter::markup(), llvm::MCInstPrinter::Memory, MI, printExprOperand(), and llvm::X86InstPrinterCommon::printOptionalSegReg().

Referenced by printMemOffs16(), printMemOffs32(), printMemOffs64(), and printMemOffs8().

printMemReference()

Definition at line 438 of file X86ATTInstPrinter.cpp.

References llvm::X86::AddrBaseReg, llvm::X86::AddrDisp, llvm::X86::AddrIndexReg, llvm::X86::AddrScaleAmt, llvm::X86::AddrSegmentReg, assert(), llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::MCOperand::getReg(), llvm::MCInstPrinter::Immediate, llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCInstPrinter::markup(), llvm::MCInstPrinter::Memory, MI, llvm::MCInstPrinter::MIA, printExprOperand(), printOperand(), llvm::X86InstPrinterCommon::printOptionalSegReg(), and llvm::MCInstPrinter::SymbolizeOperands.

Referenced by printbytemem(), printdwordmem(), printqwordmem(), printtbytemem(), printwordmem(), printxmmwordmem(), printymmwordmem(), and printzmmwordmem().

printOperand()

Implements llvm::X86InstPrinterCommon.

Definition at line 405 of file X86ATTInstPrinter.cpp.

References assert(), llvm::MCInstPrinter::CommentStream, llvm::format(), llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), MI, and printRegName().

Referenced by printDstIdx(), printMemReference(), printSrcIdx(), printU8Imm(), and printVecCompareInstr().

printqwordmem()

printRegName()

printSrcIdx()

printSrcIdx16()

printSrcIdx32()

printSrcIdx64()

printSrcIdx8()

printSTiRegOperand()

printtbytemem()

printU8Imm()

printVecCompareInstr()

Definition at line 95 of file X86ATTInstPrinter.cpp.

References assert(), llvm::X86II::EVEX_B, llvm::X86II::EVEX_K, llvm::X86II::EVEX_L2, llvm::X86II::FormMask, MI, llvm::MCInstPrinter::MII, llvm::X86II::MRMSrcMem, llvm::X86II::OpMapMask, llvm::X86II::OpPrefixMask, 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().

printwordmem()

printxmmwordmem()

printymmwordmem()

printzmmwordmem()


The documentation for this class was generated from the following files: