LLVM 19.0.0git
|
#include "AArch64Disassembler.h"
#include "AArch64ExternalSymbolizer.h"
#include "MCTargetDesc/AArch64AddressingModes.h"
#include "MCTargetDesc/AArch64MCTargetDesc.h"
#include "TargetInfo/AArch64TargetInfo.h"
#include "Utils/AArch64BaseInfo.h"
#include "llvm-c/Disassembler.h"
#include "llvm/MC/MCDecoderOps.h"
#include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include <algorithm>
#include <memory>
#include "AArch64GenDisassemblerTables.inc"
#include "AArch64GenInstrInfo.inc"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "aarch64-disassembler" |
#define | Success MCDisassembler::Success |
#define | Fail MCDisassembler::Fail |
#define | SoftFail MCDisassembler::SoftFail |
Typedefs | |
using | DecodeStatus = MCDisassembler::DecodeStatus |
Variables | |
static const MCPhysReg | MatrixZATileDecoderTable [5][16] |
#define DEBUG_TYPE "aarch64-disassembler" |
Definition at line 34 of file AArch64Disassembler.cpp.
#define Fail MCDisassembler::Fail |
Definition at line 310 of file AArch64Disassembler.cpp.
#define SoftFail MCDisassembler::SoftFail |
Definition at line 311 of file AArch64Disassembler.cpp.
#define Success MCDisassembler::Success |
Definition at line 309 of file AArch64Disassembler.cpp.
Definition at line 37 of file AArch64Disassembler.cpp.
|
static |
Definition at line 313 of file AArch64Disassembler.cpp.
Referenced by LLVMInitializeAArch64Disassembler().
|
static |
Definition at line 394 of file AArch64Disassembler.cpp.
Referenced by LLVMInitializeAArch64Disassembler().
|
static |
Definition at line 1652 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR32spRegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), and Success.
|
static |
Definition at line 1815 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR32spRegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1797 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR64RegisterClass(), Fail, Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1619 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), SoftFail, and Success.
|
static |
Definition at line 2046 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR64commonRegisterClass(), DecodeGPR64RegisterClass(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 866 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 855 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 844 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 1403 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), SoftFail, and Success.
|
static |
Definition at line 877 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 886 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 949 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Address, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), DecodeGPR64RegisterClass(), Insn, and Success.
|
static |
Definition at line 447 of file AArch64Disassembler.cpp.
References Addr, DecodeFPR128RegisterClass(), and Fail.
|
static |
Definition at line 439 of file AArch64Disassembler.cpp.
References Addr, DecodeFPR128RegisterClass(), and Fail.
|
static |
Definition at line 426 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeFMOVLaneInstruction(), DecodeFPR128_0to7RegisterClass(), DecodeFPR128_loRegisterClass(), DecodeModImmInstruction(), DecodeModImmTiedInstruction(), DecodePairLdStInstruction(), DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 478 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 466 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodePairLdStInstruction(), DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 454 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeModImmInstruction(), DecodePairLdStInstruction(), DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 490 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 580 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeAddSubERegInstruction(), DecodeAddSubImmShift(), DecodeExclusiveLdStInstruction(), DecodeLogicalImmInstruction(), DecodeMoveImmInstruction(), DecodePairLdStInstruction(), DecodePRFMRegInstruction(), DecodeSignedLdStInstruction(), DecodeTestAndBranch(), DecodeThreeAddrSRegInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 592 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeAddSubERegInstruction(), DecodeAddSubImmShift(), and DecodeLogicalImmInstruction().
|
static |
Definition at line 503 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeCPYMemOpInstruction(), and DecodeSETMemOpInstruction().
|
static |
Definition at line 515 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeAddSubERegInstruction(), DecodeAddSubImmShift(), DecodeAdrInstruction(), DecodeAuthLoadInstruction(), DecodeCPYMemOpInstruction(), DecodeExclusiveLdStInstruction(), DecodeFMOVLaneInstruction(), DecodeLogicalImmInstruction(), DecodeMoveImmInstruction(), DecodePairLdStInstruction(), DecodePRFMRegInstruction(), DecodeSETMemOpInstruction(), DecodeSignedLdStInstruction(), DecodeSyspXzrInstruction(), DecodeTestAndBranch(), DecodeThreeAddrSRegInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 542 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeAddSubERegInstruction(), DecodeAddSubImmShift(), DecodeAuthLoadInstruction(), DecodeExclusiveLdStInstruction(), DecodeLogicalImmInstruction(), DecodePairLdStInstruction(), DecodePRFMRegInstruction(), DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 528 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 1938 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeWSeqPairsClassRegisterClass(), and DecodeXSeqPairsClassRegisterClass().
|
static |
Definition at line 2018 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 1709 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR32spRegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), llvm::AArch64_AM::isValidDecodeLogicalImmediate(), and Success.
|
static |
Definition at line 567 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 554 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 733 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, MatrixZATileDecoderTable, and Success.
|
static |
Definition at line 712 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 923 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
Referenced by DecodePRFMRegInstruction().
|
static |
Definition at line 1740 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), DecodeFPR64RegisterClass(), llvm::MCInst::getOpcode(), and Success.
|
static |
Definition at line 1779 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), and Success.
|
static |
Definition at line 1112 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), Fail, llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), and Success.
|
static |
Definition at line 931 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 941 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 1485 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), DecodeFPR32RegisterClass(), DecodeFPR64RegisterClass(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), SoftFail, and Success.
|
static |
Definition at line 893 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), Fail, Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 908 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), llvm::MCInst::getOpcode(), Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 779 of file AArch64Disassembler.cpp.
References Addr, DecodePNRRegisterClass(), and Fail.
|
static |
Definition at line 756 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodePNR_p8to15RegisterClass().
|
static |
Definition at line 800 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 788 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 768 of file AArch64Disassembler.cpp.
References Addr, DecodePPRRegisterClass(), and Fail.
|
static |
Definition at line 744 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodePPR_3bRegisterClass().
|
static |
Definition at line 2095 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), DecodeMemExtend(), Fail, llvm::MCInst::getOpcode(), and Success.
|
static |
Definition at line 833 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 822 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 811 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 2071 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR64commonRegisterClass(), DecodeGPR64RegisterClass(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 1204 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), DecodeFPR16RegisterClass(), DecodeFPR32RegisterClass(), DecodeFPR64RegisterClass(), DecodeFPR8RegisterClass(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), SoftFail, and Success.
|
static |
Definition at line 2003 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 2037 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 2030 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 1987 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeZPRRegisterClass(), Fail, llvm::MCInst::getOpcode(), llvm::AArch64_AM::isValidDecodeLogicalImmediate(), and Success.
|
static |
Definition at line 1966 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR64RegisterClass(), Fail, and Success.
|
static |
Definition at line 1872 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCDisassembler::getSubtargetInfo(), isInvalidPState(), and Success.
|
static |
Definition at line 1893 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCDisassembler::getSubtargetInfo(), isInvalidPState(), and Success.
|
static |
Definition at line 1914 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1051 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), Fail, llvm::MCInst::getOpcode(), and Success.
|
static |
Definition at line 1850 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1146 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), DecodeFPR16RegisterClass(), DecodeFPR32RegisterClass(), DecodeFPR64RegisterClass(), DecodeFPR8RegisterClass(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1038 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 1032 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 1026 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 1044 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 978 of file AArch64Disassembler.cpp.
References llvm::Add, llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
Referenced by DecodeVecShiftL16Imm(), DecodeVecShiftL32Imm(), DecodeVecShiftL64Imm(), and DecodeVecShiftL8Imm().
|
static |
Definition at line 1008 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 1014 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 996 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 1002 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 984 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 990 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 1020 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 972 of file AArch64Disassembler.cpp.
References llvm::Add, llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
Referenced by DecodeVecShiftR16Imm(), DecodeVecShiftR16ImmNarrow(), DecodeVecShiftR32Imm(), DecodeVecShiftR32ImmNarrow(), DecodeVecShiftR64Imm(), DecodeVecShiftR64ImmNarrow(), and DecodeVecShiftR8Imm().
|
static |
Definition at line 1951 of file AArch64Disassembler.cpp.
References Addr, and DecodeGPRSeqPairsClassRegisterClass().
|
static |
Definition at line 1959 of file AArch64Disassembler.cpp.
References Addr, and DecodeGPRSeqPairsClassRegisterClass().
|
static |
Definition at line 665 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 632 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 687 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 643 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 676 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 654 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 699 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 624 of file AArch64Disassembler.cpp.
References llvm::Address, DecodeZPRRegisterClass(), and Fail.
|
static |
Definition at line 616 of file AArch64Disassembler.cpp.
References llvm::Address, DecodeZPRRegisterClass(), and Fail.
|
static |
Definition at line 604 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeSVELogicalImmInstruction(), DecodeZPR_3bRegisterClass(), and DecodeZPR_4bRegisterClass().
Definition at line 1865 of file AArch64Disassembler.cpp.
Referenced by DecodeSystemPStateImm0_15Instruction(), and DecodeSystemPStateImm0_1Instruction().
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Disassembler | ( | ) |
Definition at line 402 of file AArch64Disassembler.cpp.
References createAArch64Disassembler(), createAArch64ExternalSymbolizer(), llvm::getTheAArch64_32Target(), llvm::getTheAArch64beTarget(), llvm::getTheAArch64leTarget(), llvm::getTheARM64_32Target(), llvm::getTheARM64Target(), llvm::TargetRegistry::RegisterMCDisassembler(), and llvm::TargetRegistry::RegisterMCSymbolizer().
Definition at line 721 of file AArch64Disassembler.cpp.
Referenced by DecodeMatrixTile().