LLVM 17.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 SmallVector< SmallVector< unsigned, 16 >, 5 > | MatrixZATileDecoderTable |
#define DEBUG_TYPE "aarch64-disassembler" |
Definition at line 34 of file AArch64Disassembler.cpp.
#define Fail MCDisassembler::Fail |
Definition at line 301 of file AArch64Disassembler.cpp.
#define SoftFail MCDisassembler::SoftFail |
Definition at line 302 of file AArch64Disassembler.cpp.
#define Success MCDisassembler::Success |
Definition at line 300 of file AArch64Disassembler.cpp.
Definition at line 37 of file AArch64Disassembler.cpp.
|
static |
Definition at line 304 of file AArch64Disassembler.cpp.
Referenced by LLVMInitializeAArch64Disassembler().
|
static |
Definition at line 385 of file AArch64Disassembler.cpp.
Referenced by LLVMInitializeAArch64Disassembler().
|
static |
Definition at line 1609 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 1772 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 1754 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR64RegisterClass(), Fail, Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1576 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), SoftFail, and Success.
|
static |
Definition at line 2003 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR64commonRegisterClass(), DecodeGPR64RegisterClass(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 838 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 827 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 816 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 1360 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), DecodeGPR64spRegisterClass(), Fail, llvm::MCInst::getOpcode(), SoftFail, and Success.
|
static |
Definition at line 849 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 858 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 906 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Address, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), DecodeGPR64RegisterClass(), Insn, and Success.
|
static |
Definition at line 430 of file AArch64Disassembler.cpp.
References Addr, DecodeFPR128RegisterClass(), and Fail.
|
static |
Definition at line 417 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeFMOVLaneInstruction(), DecodeFPR128_loRegisterClass(), DecodeModImmInstruction(), DecodeModImmTiedInstruction(), DecodePairLdStInstruction(), DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 461 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 449 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodePairLdStInstruction(), DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 437 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 473 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeSignedLdStInstruction(), and DecodeUnsignedLdStInstruction().
|
static |
Definition at line 563 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 575 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeAddSubERegInstruction(), DecodeAddSubImmShift(), and DecodeLogicalImmInstruction().
|
static |
Definition at line 486 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeCPYMemOpInstruction(), and DecodeSETMemOpInstruction().
|
static |
Definition at line 498 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 525 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 511 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 1895 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodeWSeqPairsClassRegisterClass(), and DecodeXSeqPairsClassRegisterClass().
|
static |
Definition at line 1975 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 1666 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 550 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 537 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 717 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, MatrixZATileDecoderTable, and Success.
|
static |
Definition at line 695 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 880 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
Referenced by DecodePRFMRegInstruction().
|
static |
Definition at line 1697 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), DecodeFPR64RegisterClass(), llvm::MCInst::getOpcode(), and Success.
|
static |
Definition at line 1736 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeFPR128RegisterClass(), and Success.
|
static |
Definition at line 1069 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 888 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 898 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 1442 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 865 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), llvm::MCInst::getOpcode(), Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 772 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 760 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 740 of file AArch64Disassembler.cpp.
References Addr, DecodePPRRegisterClass(), and Fail.
|
static |
Definition at line 751 of file AArch64Disassembler.cpp.
References Addr, DecodePPRRegisterClass(), and Fail.
|
static |
Definition at line 728 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
Referenced by DecodePPR_3bRegisterClass(), and DecodePPR_p8to15RegisterClass().
|
static |
Definition at line 2052 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 805 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 794 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 783 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 2028 of file AArch64Disassembler.cpp.
References Addr, DecodeGPR64commonRegisterClass(), DecodeGPR64RegisterClass(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 1161 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 1960 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 1994 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), Fail, and Success.
|
static |
Definition at line 1987 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and Success.
|
static |
Definition at line 1944 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 1923 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR64RegisterClass(), Fail, and Success.
|
static |
Definition at line 1829 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 1850 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 1871 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1008 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), Fail, llvm::MCInst::getOpcode(), and Success.
|
static |
Definition at line 1807 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), Addr, llvm::MCOperand::createImm(), Success, and llvm::MCDisassembler::tryAddingSymbolicOperand().
|
static |
Definition at line 1103 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 995 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 989 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 983 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 1001 of file AArch64Disassembler.cpp.
References DecodeVecShiftLImm().
|
static |
Definition at line 935 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 965 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 971 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 953 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 959 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 941 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 947 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 977 of file AArch64Disassembler.cpp.
References DecodeVecShiftRImm().
|
static |
Definition at line 929 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 1908 of file AArch64Disassembler.cpp.
References Addr, and DecodeGPRSeqPairsClassRegisterClass().
|
static |
Definition at line 1916 of file AArch64Disassembler.cpp.
References Addr, and DecodeGPRSeqPairsClassRegisterClass().
|
static |
Definition at line 648 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 615 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 670 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 626 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 659 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 637 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 682 of file AArch64Disassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), Fail, and Success.
|
static |
Definition at line 607 of file AArch64Disassembler.cpp.
References llvm::Address, DecodeZPRRegisterClass(), and Fail.
|
static |
Definition at line 599 of file AArch64Disassembler.cpp.
References llvm::Address, DecodeZPRRegisterClass(), and Fail.
|
static |
Definition at line 587 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 1822 of file AArch64Disassembler.cpp.
Referenced by DecodeSystemPStateImm0_15Instruction(), and DecodeSystemPStateImm0_1Instruction().
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Disassembler | ( | ) |
Definition at line 393 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().
|
static |
Definition at line 705 of file AArch64Disassembler.cpp.
Referenced by DecodeMatrixTile().