LLVM 22.0.0git
|
#include "Target/AArch64/MCTargetDesc/AArch64InstPrinter.h"
Static Public Member Functions | |
static const char * | getRegisterName (MCRegister Reg, unsigned AltIdx=AArch64::NoRegAltName) |
Additional Inherited Members | |
Public Types inherited from llvm::MCInstPrinter | |
enum class | Markup { Immediate , Register , Target , Memory } |
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 23 of file AArch64InstPrinter.h.
AArch64InstPrinter::AArch64InstPrinter | ( | const MCAsmInfo & | MAI, |
const MCInstrInfo & | MII, | ||
const MCRegisterInfo & | MRI ) |
Definition at line 43 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::MCInstPrinter(), llvm::MCInstPrinter::MII, and llvm::MCInstPrinter::MRI.
Referenced by llvm::AArch64AppleInstPrinter::AArch64AppleInstPrinter().
Customize the printer according to a command line option.
Reimplemented from llvm::MCInstPrinter.
Definition at line 53 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::PrintAliases.
|
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.
References MI.
|
static |
|
virtual |
Reimplemented in llvm::AArch64AppleInstPrinter.
Definition at line 70 of file AArch64InstPrinter.cpp.
References getRegisterName().
|
protected |
Definition at line 1227 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::CommentStream, llvm::MCInstPrinter::formatImm(), llvm::MCOperand::getExpr(), llvm::MCOperand::getImm(), llvm::AArch64_AM::getShiftValue(), llvm::MCInstPrinter::Immediate, llvm::MCOperand::isExpr(), llvm::MCOperand::isImm(), llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), MI, and printShifter().
|
protected |
Definition at line 1817 of file AArch64InstPrinter.cpp.
References llvm::Address, llvm::MCInstPrinter::formatHex(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), MI, llvm::Offset, llvm::MCInstPrinter::PrintBranchImmAsAddress, llvm::MCInstPrinter::SymbolizeOperands, and llvm::MCInstPrinter::Target.
|
virtual |
Reimplemented in llvm::AArch64AppleInstPrinter.
References llvm::Address, and MI.
Referenced by printInst().
|
protected |
Definition at line 1784 of file AArch64InstPrinter.cpp.
References llvm::Address, llvm::dyn_cast(), llvm::MCInstPrinter::formatHex(), llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), MI, llvm::Offset, llvm::MCInstPrinter::PrintBranchImmAsAddress, llvm::MCInstPrinter::SymbolizeOperands, and llvm::MCInstPrinter::Target.
|
inlineprotected |
Definition at line 125 of file AArch64InstPrinter.h.
References llvm::BitWidth, MI, and printAMIndexedWB().
|
protected |
Definition at line 1439 of file AArch64InstPrinter.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(), MI, and printRegName().
Referenced by printAMIndexedWB().
|
protected |
Definition at line 1403 of file AArch64InstPrinter.cpp.
References MI, and printRegName().
|
protected |
Definition at line 1286 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::getArithExtendType(), llvm::AArch64_AM::getArithShiftValue(), llvm::AArch64_AM::getShiftExtendName(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, llvm::AArch64_AM::UXTW, and llvm::AArch64_AM::UXTX.
Referenced by printExtendedRegister().
|
protected |
Definition at line 1872 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1849 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1499 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1987 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1389 of file AArch64InstPrinter.cpp.
References llvm::AArch64CC::getCondCodeName(), and MI.
|
virtual |
Reimplemented in llvm::AArch64AppleInstPrinter.
References llvm::Address, MI, OpIdx, and Reg.
|
protected |
Definition at line 2121 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1279 of file AArch64InstPrinter.cpp.
References MI, printArithExtend(), and printRegName().
|
protected |
Definition at line 1510 of file AArch64InstPrinter.cpp.
References llvm::bit_cast(), llvm::format(), llvm::MCOperand::getDFPImm(), llvm::AArch64_AM::getFPImmFloat(), llvm::MCOperand::getImm(), llvm::MCInstPrinter::Immediate, llvm::MCOperand::isDFPImm(), llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 2131 of file AArch64InstPrinter.cpp.
References llvm::getWRegFromXReg(), MI, and printRegName().
|
protected |
Definition at line 2138 of file AArch64InstPrinter.cpp.
References MI, llvm::MCInstPrinter::MRI, and printRegName().
|
protected |
Definition at line 1619 of file AArch64InstPrinter.cpp.
References MI, llvm::MCInstPrinter::MRI, printRegName(), and llvm::size().
Referenced by printSyspAlias().
|
protected |
Definition at line 1171 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
Referenced by printOperand().
|
protected |
Definition at line 2059 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::formatImm(), llvm::AArch64_AM::getShiftType(), llvm::AArch64_AM::getShiftValue(), llvm::MCInstPrinter::Immediate, llvm::AArch64_AM::LSL, llvm::MCInstPrinter::markup(), MI, printImmSVE(), printShifter(), and T.
|
protected |
Definition at line 1178 of file AArch64InstPrinter.cpp.
References llvm::format(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1420 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), MI, and llvm::Offset.
|
protected |
Definition at line 1412 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 2041 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::CommentStream, llvm::MCInstPrinter::formatDec(), llvm::MCInstPrinter::formatHex(), llvm::MCInstPrinter::getPrintImmHex(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and T.
Referenced by printImm8OptLsl(), and printSVELogicalImm().
|
protected |
Print a list of vector registers where the type suffix is implicit (i.e.
attached to the instruction rather than the registers).
Definition at line 1746 of file AArch64InstPrinter.cpp.
References MI, and printVectorList().
|
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 74 of file AArch64InstPrinter.cpp.
References llvm::Address, llvm::atomicBarrierDroppedOnZero(), llvm::BitWidth, llvm::MCInstPrinter::CommentStream, llvm::AArch64_AM::decodeLogicalImmediate(), llvm::MCInstPrinter::formatDec(), llvm::MCInstPrinter::formatHex(), llvm::MCInstPrinter::formatImm(), llvm::getImm(), llvm::MCOperand::getImm(), llvm::MCInstPrinter::getPrintImmHex(), llvm::MCOperand::getReg(), llvm::getWRegFromXReg(), llvm::MCSubtargetInfo::hasFeature(), llvm::MCInstPrinter::Immediate, llvm::AArch64_AM::isAnyMOVWMovAlias(), llvm::MCOperand::isImm(), llvm::AArch64_AM::isMOVNMovAlias(), llvm::AArch64_AM::isMOVZMovAlias(), llvm::MCInstPrinter::MAI, llvm::MCInstPrinter::markup(), llvm::maskTrailingOnes(), MI, llvm::MCInstPrinter::PrintAliases, printAliasInstr(), llvm::MCInstPrinter::printAnnotation(), printInstruction(), printRangePrefetchAlias(), printRegName(), printSysAlias(), printSyspAlias(), and llvm::SignExtend64().
Referenced by llvm::AArch64AppleInstPrinter::printInst().
|
virtual |
Reimplemented in llvm::AArch64AppleInstPrinter.
References llvm::Address, and MI.
Referenced by printInst().
|
protected |
Definition at line 1396 of file AArch64InstPrinter.cpp.
References llvm::AArch64CC::getCondCodeName(), llvm::AArch64CC::getInvertedCondCode(), and MI.
|
protected |
Definition at line 1250 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::decodeLogicalImmediate(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, and T.
|
protected |
Definition at line 1094 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getReg(), llvm::MCOperand::isReg(), llvm_unreachable, MI, and printRegName().
|
protected |
Definition at line 1778 of file AArch64InstPrinter.cpp.
References MI.
|
protected |
Definition at line 1138 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getReg(), llvm::MCOperand::isReg(), MI, and printRegName().
|
protected |
Definition at line 1637 of file AArch64InstPrinter.cpp.
References I, MI, and printRegName().
|
protected |
Definition at line 1125 of file AArch64InstPrinter.cpp.
References assert(), llvm::sampleprof::Base, llvm::MCOperand::getReg(), getRegisterName(), llvm::MCOperand::isReg(), MI, and RegName.
|
inlineprotected |
Definition at line 100 of file AArch64InstPrinter.h.
References MI, and printMemExtend().
|
protected |
Definition at line 1333 of file AArch64InstPrinter.cpp.
References MI, and printMemExtendImpl().
Referenced by printMemExtend().
|
protected |
Definition at line 1317 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::Log2_32(), and llvm::MCInstPrinter::markup().
Referenced by printMemExtend(), and printRegWithShiftExtend().
|
protected |
Definition at line 1909 of file AArch64InstPrinter.cpp.
References llvm::AArch64SysReg::genericRegisterString(), lookupSysReg(), and MI.
|
protected |
Definition at line 1936 of file AArch64InstPrinter.cpp.
References llvm::AArch64SysReg::genericRegisterString(), lookupSysReg(), and MI.
|
protected |
Definition at line 1157 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::MAI, MI, printImm(), and printRegName().
Referenced by printRangePrefetchAlias(), and printRegWithShiftExtend().
|
protected |
Definition at line 2154 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::AArch64PHint::lookupPHintByEncoding(), llvm::MCInstPrinter::markup(), and MI.
|
inlineprotected |
Definition at line 73 of file AArch64InstPrinter.h.
References MI, and printPostIncOperand().
|
protected |
Definition at line 1198 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm_unreachable, llvm::MCInstPrinter::markup(), MI, and printRegName().
Referenced by printPostIncOperand().
|
protected |
Definition at line 1360 of file AArch64InstPrinter.cpp.
References llvm_unreachable, MI, and Reg.
|
protected |
Definition at line 1468 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1488 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 839 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::formatImm(), getRegisterName(), MI, llvm::MCInstPrinter::MRI, llvm::MCInstPrinter::printAnnotation(), and printOperand().
Referenced by printInst().
|
overridevirtual |
Print the assembler register name.
Reimplemented from llvm::MCInstPrinter.
Definition at line 61 of file AArch64InstPrinter.cpp.
References getRegisterName(), llvm::MCInstPrinter::markup(), and llvm::MCInstPrinter::Register.
Referenced by printAMIndexedWB(), printAMNoIndex(), printExtendedRegister(), printGPR64as32(), printGPR64x8(), printGPRSeqPairsClassOperand(), llvm::AArch64AppleInstPrinter::printInst(), printInst(), printMatrix(), printMatrixTile(), printMatrixTileList(), printOperand(), printPostIncOperand(), printShiftedRegister(), printSVERegOp(), printVectorList(), printVRegOperand(), and printZPRasFPR().
void AArch64InstPrinter::printRegName | ( | raw_ostream & | OS, |
MCRegister | Reg, | ||
unsigned | AltIdx ) |
Definition at line 65 of file AArch64InstPrinter.cpp.
References getRegisterName(), llvm::MCInstPrinter::markup(), and llvm::MCInstPrinter::Register.
|
protected |
Definition at line 1342 of file AArch64InstPrinter.cpp.
References assert(), MI, printMemExtendImpl(), and printOperand().
|
protected |
Definition at line 1455 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), and MI.
|
protected |
Definition at line 1272 of file AArch64InstPrinter.cpp.
References MI, printRegName(), and printShifter().
|
protected |
Definition at line 1259 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::getShiftExtendName(), llvm::AArch64_AM::getShiftType(), llvm::AArch64_AM::getShiftValue(), llvm::MCInstPrinter::Immediate, llvm::AArch64_AM::LSL, llvm::MCInstPrinter::markup(), and MI.
Referenced by printAddSubImm(), printImm8OptLsl(), and printShiftedRegister().
|
protected |
Definition at line 1978 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::decodeAdvSIMDModImmType10(), llvm::format(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1186 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, and Size.
|
protected |
Definition at line 1146 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getImm(), llvm::MCOperand::isImm(), and MI.
|
protected |
Definition at line 2084 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::decodeLogicalImmediate(), llvm::MCInstPrinter::formatHex(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, printImmSVE(), and T.
|
protected |
Definition at line 1994 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 2020 of file AArch64InstPrinter.cpp.
References llvm_unreachable, MI, and printRegName().
|
protected |
Definition at line 2004 of file AArch64InstPrinter.cpp.
References llvm_unreachable, and MI.
|
protected |
Definition at line 889 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCOperand::getImm(), getRegisterName(), llvm::MCSubtargetInfo::hasFeature(), llvm::SysAlias::haveFeatures(), MI, llvm::SysAlias::Name, llvm::SysAliasReg::NeedsReg, and llvm::transform().
Referenced by printInst().
|
protected |
Definition at line 1219 of file AArch64InstPrinter.cpp.
|
protected |
Definition at line 1033 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCOperand::getImm(), llvm::MCSubtargetInfo::hasFeature(), llvm::SysAlias::haveFeatures(), MI, llvm::SysAlias::Name, printGPRSeqPairsClassOperand(), printSyspXzrPair(), and llvm::transform().
Referenced by printInst().
|
protected |
Definition at line 2145 of file AArch64InstPrinter.cpp.
References assert(), getRegisterName(), and MI.
Referenced by printSyspAlias().
|
protected |
Definition at line 1963 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCSubtargetInfo::getFeatureBits(), and MI.
|
protected |
Definition at line 1754 of file AArch64InstPrinter.cpp.
References llvm::itostr(), MI, and printVectorList().
|
inlineprotected |
Definition at line 119 of file AArch64InstPrinter.h.
References MI, and printUImm12Offset().
|
protected |
Definition at line 1428 of file AArch64InstPrinter.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(), and MI.
Referenced by printUImm12Offset().
|
protected |
Definition at line 1771 of file AArch64InstPrinter.cpp.
References MI.
|
protected |
Definition at line 1662 of file AArch64InstPrinter.cpp.
References getNextVectorRegister(), MI, llvm::MCInstPrinter::MRI, and printRegName().
Referenced by printImplicitlyTypedVectorList(), llvm::AArch64AppleInstPrinter::printInst(), and printTypedVectorList().
|
protected |
Definition at line 1211 of file AArch64InstPrinter.cpp.
References assert(), MI, and printRegName().
|
protected |
Definition at line 2103 of file AArch64InstPrinter.cpp.
References llvm::sampleprof::Base, llvm_unreachable, MI, and printRegName().