|
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 1319 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 1920 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 1887 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 127 of file AArch64InstPrinter.h.
References llvm::BitWidth, MI, and printAMIndexedWB().
|
protected |
Definition at line 1531 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 1495 of file AArch64InstPrinter.cpp.
References MI, and printRegName().
|
protected |
Definition at line 1378 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 1975 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1952 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1591 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1602 of file AArch64InstPrinter.cpp.
References MI.
|
protected |
Definition at line 2090 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1481 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 2224 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1371 of file AArch64InstPrinter.cpp.
References MI, printArithExtend(), and printRegName().
|
protected |
Definition at line 1613 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 2234 of file AArch64InstPrinter.cpp.
References llvm::getWRegFromXReg(), MI, and printRegName().
|
protected |
Definition at line 2241 of file AArch64InstPrinter.cpp.
References MI, llvm::MCInstPrinter::MRI, and printRegName().
|
protected |
Definition at line 1722 of file AArch64InstPrinter.cpp.
References MI, llvm::MCInstPrinter::MRI, printRegName(), and llvm::size().
Referenced by printSyspAlias().
|
protected |
Definition at line 1263 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
Referenced by printOperand().
|
protected |
Definition at line 2162 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 1270 of file AArch64InstPrinter.cpp.
References llvm::format(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1512 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), MI, and llvm::Offset.
|
protected |
Definition at line 1504 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 2144 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 1849 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(), printSyslAlias(), 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 1488 of file AArch64InstPrinter.cpp.
References llvm::AArch64CC::getCondCodeName(), llvm::AArch64CC::getInvertedCondCode(), and MI.
|
protected |
Definition at line 1342 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::decodeLogicalImmediate(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, and T.
|
protected |
Definition at line 1186 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getReg(), llvm::MCOperand::isReg(), llvm_unreachable, MI, and printRegName().
|
protected |
Definition at line 1881 of file AArch64InstPrinter.cpp.
References MI.
|
protected |
Definition at line 1230 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getReg(), llvm::MCOperand::isReg(), MI, and printRegName().
|
protected |
Definition at line 1740 of file AArch64InstPrinter.cpp.
References I, MI, and printRegName().
|
protected |
Definition at line 1217 of file AArch64InstPrinter.cpp.
References assert(), llvm::sampleprof::Base, llvm::MCOperand::getReg(), getRegisterName(), llvm::MCOperand::isReg(), MI, and RegName.
|
inlineprotected |
Definition at line 102 of file AArch64InstPrinter.h.
References MI, and printMemExtend().
|
protected |
Definition at line 1425 of file AArch64InstPrinter.cpp.
References MI, and printMemExtendImpl().
Referenced by printMemExtend().
|
protected |
Definition at line 1409 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm::Log2_32(), and llvm::MCInstPrinter::markup().
Referenced by printMemExtend(), and printRegWithShiftExtend().
|
protected |
Definition at line 2012 of file AArch64InstPrinter.cpp.
References llvm::AArch64SysReg::genericRegisterString(), lookupSysReg(), and MI.
|
protected |
Definition at line 2039 of file AArch64InstPrinter.cpp.
References llvm::AArch64SysReg::genericRegisterString(), lookupSysReg(), and MI.
|
protected |
Definition at line 1249 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCInstPrinter::MAI, MI, printImm(), and printRegName().
Referenced by printRangePrefetchAlias(), and printRegWithShiftExtend().
|
protected |
Definition at line 2257 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::AArch64PHint::lookupPHintByEncoding(), llvm::MCInstPrinter::markup(), and MI.
|
inlineprotected |
Definition at line 75 of file AArch64InstPrinter.h.
References MI, and printPostIncOperand().
|
protected |
Definition at line 1290 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::Immediate, llvm_unreachable, llvm::MCInstPrinter::markup(), MI, and printRegName().
Referenced by printPostIncOperand().
|
protected |
Definition at line 1452 of file AArch64InstPrinter.cpp.
References llvm_unreachable, MI, and Reg.
|
protected |
Definition at line 1560 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1580 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 845 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 1434 of file AArch64InstPrinter.cpp.
References assert(), MI, printMemExtendImpl(), and printOperand().
|
protected |
Definition at line 1547 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), and MI.
|
protected |
Definition at line 1364 of file AArch64InstPrinter.cpp.
References MI, printRegName(), and printShifter().
|
protected |
Definition at line 1351 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 2081 of file AArch64InstPrinter.cpp.
References llvm::AArch64_AM::decodeAdvSIMDModImmType10(), llvm::format(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 1278 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), MI, and Size.
|
protected |
Definition at line 1238 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCOperand::getImm(), llvm::MCOperand::isImm(), and MI.
|
protected |
Definition at line 2187 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 2097 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCInstPrinter::Immediate, llvm::MCInstPrinter::markup(), and MI.
|
protected |
Definition at line 2123 of file AArch64InstPrinter.cpp.
References llvm_unreachable, MI, and printRegName().
|
protected |
Definition at line 2107 of file AArch64InstPrinter.cpp.
References llvm_unreachable, and MI.
|
protected |
Definition at line 895 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCOperand::getImm(), getRegisterName(), llvm::MCSubtargetInfo::hasFeature(), llvm::SysAlias::haveFeatures(), MI, llvm::SysAlias::Name, llvm::SysAliasOptionalReg::NeedsReg, llvm::SysAliasReg::NeedsReg, llvm::SysAliasOptionalReg::OptionalReg, and llvm::transform().
Referenced by printInst().
|
protected |
Definition at line 1311 of file AArch64InstPrinter.cpp.
|
protected |
Definition at line 1075 of file AArch64InstPrinter.cpp.
References assert(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCOperand::getImm(), getRegisterName(), llvm::SysAlias::haveFeatures(), MI, llvm::SysAlias::Name, and llvm::transform().
Referenced by printInst().
|
protected |
Definition at line 1124 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 2248 of file AArch64InstPrinter.cpp.
References assert(), getRegisterName(), and MI.
Referenced by printSyspAlias().
|
protected |
Definition at line 2066 of file AArch64InstPrinter.cpp.
References llvm::MCInstPrinter::formatImm(), llvm::MCSubtargetInfo::getFeatureBits(), and MI.
|
protected |
Definition at line 1857 of file AArch64InstPrinter.cpp.
References llvm::itostr(), MI, and printVectorList().
|
inlineprotected |
Definition at line 121 of file AArch64InstPrinter.h.
References MI, and printUImm12Offset().
|
protected |
Definition at line 1520 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 1874 of file AArch64InstPrinter.cpp.
References MI.
|
protected |
Definition at line 1765 of file AArch64InstPrinter.cpp.
References getNextVectorRegister(), MI, llvm::MCInstPrinter::MRI, and printRegName().
Referenced by printImplicitlyTypedVectorList(), llvm::AArch64AppleInstPrinter::printInst(), and printTypedVectorList().
|
protected |
Definition at line 1303 of file AArch64InstPrinter.cpp.
References assert(), MI, and printRegName().
|
protected |
Definition at line 2206 of file AArch64InstPrinter.cpp.
References llvm::sampleprof::Base, llvm_unreachable, MI, and printRegName().