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 1228 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 1818 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 1785 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 1440 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 1404 of file AArch64InstPrinter.cpp.
References MI, and printRegName().
|
protected |
Definition at line 1287 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 1873 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1850 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1500 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1988 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1390 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 2122 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1280 of file AArch64InstPrinter.cpp.
References MI, printArithExtend(), and printRegName().
|
protected |
Definition at line 1511 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 2132 of file AArch64InstPrinter.cpp.
References llvm::getWRegFromXReg(), MI, and printRegName().
|
protected |
Definition at line 2139 of file AArch64InstPrinter.cpp.
References MI, llvm::MCInstPrinter::MRI, and printRegName().
|
protected |
Definition at line 1620 of file AArch64InstPrinter.cpp.
References MI, llvm::MCInstPrinter::MRI, printRegName(), and llvm::size().
Referenced by printSyspAlias().
|
protected |
Definition at line 1172 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
Referenced by printOperand().
|
protected |
Definition at line 2060 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 1179 of file AArch64InstPrinter.cpp.
References llvm::format(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1421 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), MI, and llvm::Offset.
|
protected |
Definition at line 1413 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 2042 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 1747 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 1397 of file AArch64InstPrinter.cpp.
References llvm::AArch64CC::getCondCodeName(), llvm::AArch64CC::getInvertedCondCode(), and MI.
|
protected |
Definition at line 1251 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::decodeLogicalImmediate(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, and T.
|
protected |
Definition at line 1095 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getReg(), llvm::MCOperand::isReg(), llvm_unreachable, MI, and printRegName().
|
protected |
Definition at line 1779 of file AArch64InstPrinter.cpp.
References MI.
|
protected |
Definition at line 1139 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getReg(), llvm::MCOperand::isReg(), MI, and printRegName().
|
protected |
Definition at line 1638 of file AArch64InstPrinter.cpp.
References I, MI, and printRegName().
|
protected |
Definition at line 1126 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 1334 of file AArch64InstPrinter.cpp.
References MI, and printMemExtendImpl().
Referenced by printMemExtend().
|
protected |
Definition at line 1318 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::Log2_32(), and llvm::MCInstPrinter::markup().
Referenced by printMemExtend(), and printRegWithShiftExtend().
|
protected |
Definition at line 1910 of file AArch64InstPrinter.cpp.
References llvm::AArch64SysReg::genericRegisterString(), lookupSysReg(), and MI.
|
protected |
Definition at line 1937 of file AArch64InstPrinter.cpp.
References llvm::AArch64SysReg::genericRegisterString(), lookupSysReg(), and MI.
|
protected |
Definition at line 1158 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::MAI, MI, printImm(), and printRegName().
Referenced by printRangePrefetchAlias(), and printRegWithShiftExtend().
|
protected |
Definition at line 2155 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 1199 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm_unreachable, llvm::MCInstPrinter::markup(), MI, and printRegName().
Referenced by printPostIncOperand().
|
protected |
Definition at line 1361 of file AArch64InstPrinter.cpp.
References llvm_unreachable, MI, and Reg.
|
protected |
Definition at line 1469 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1489 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 1343 of file AArch64InstPrinter.cpp.
References assert(), MI, printMemExtendImpl(), and printOperand().
|
protected |
Definition at line 1456 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), and MI.
|
protected |
Definition at line 1273 of file AArch64InstPrinter.cpp.
References MI, printRegName(), and printShifter().
|
protected |
Definition at line 1260 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 1979 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::decodeAdvSIMDModImmType10(), llvm::format(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1187 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, and Size.
|
protected |
Definition at line 1147 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getImm(), llvm::MCOperand::isImm(), and MI.
|
protected |
Definition at line 2085 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 1995 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 2021 of file AArch64InstPrinter.cpp.
References llvm_unreachable, MI, and printRegName().
|
protected |
Definition at line 2005 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 1220 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 2146 of file AArch64InstPrinter.cpp.
References assert(), getRegisterName(), and MI.
Referenced by printSyspAlias().
|
protected |
Definition at line 1964 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCSubtargetInfo::getFeatureBits(), and MI.
|
protected |
Definition at line 1755 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 1429 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 1772 of file AArch64InstPrinter.cpp.
References MI.
|
protected |
Definition at line 1663 of file AArch64InstPrinter.cpp.
References getNextVectorRegister(), MI, llvm::MCInstPrinter::MRI, and printRegName().
Referenced by printImplicitlyTypedVectorList(), llvm::AArch64AppleInstPrinter::printInst(), and printTypedVectorList().
|
protected |
Definition at line 1212 of file AArch64InstPrinter.cpp.
References assert(), MI, and printRegName().
|
protected |
Definition at line 2104 of file AArch64InstPrinter.cpp.
References llvm::sampleprof::Base, llvm_unreachable, MI, and printRegName().