LLVM 22.0.0git
|
#include "MCTargetDesc/XtensaMCTargetDesc.h"
#include "TargetInfo/XtensaTargetInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDecoder.h"
#include "llvm/MC/MCDecoderOps.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Endian.h"
#include "XtensaGenDisassemblerTables.inc"
Go to the source code of this file.
Classes | |
struct | DecodeRegister |
Macros | |
#define | DEBUG_TYPE "Xtensa-disassembler" |
Functions | |
static MCDisassembler * | createXtensaDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) |
LLVM_EXTERNAL_VISIBILITY void | LLVMInitializeXtensaDisassembler () |
static DecodeStatus | DecodeARRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeMRRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeMR01RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeMR23RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeFPRRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeURRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder) |
static DecodeStatus | DecodeSRRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const MCDisassembler *Decoder) |
static DecodeStatus | DecodeBRRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder) |
static bool | tryAddingSymbolicOperand (int64_t Value, bool isBranch, uint64_t Address, uint64_t Offset, uint64_t InstSize, MCInst &MI, const void *Decoder) |
static DecodeStatus | decodeCallOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeJumpOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeBranchOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeLoopOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeL32ROperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm8Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm8_sh8Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm12Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeUimm4Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeUimm5Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm1_16Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm1n_15Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm32n_95Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm8n_7Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm64n_4nOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeEntry_Imm12OpValue (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeShimm1_31Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeB4constOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeB4constuOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeImm7_22Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeMem8Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeMem16Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeMem32Operand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | decodeMem32nOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder) |
static DecodeStatus | readInstruction16 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint64_t &Insn, bool IsLittleEndian) |
Read two bytes from the ArrayRef and return 16 bit data sorted according to the given endianness. | |
static DecodeStatus | readInstruction24 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint64_t &Insn, bool IsLittleEndian) |
Read three bytes from the ArrayRef and return 24 bit data. |
Variables | |
const MCPhysReg | ARDecoderTable [] |
const DecodeRegister | SRDecoderTable [] |
static int64_t | TableB4const [16] |
static int64_t | TableB4constu [16] |
#define DEBUG_TYPE "Xtensa-disassembler" |
Definition at line 30 of file XtensaDisassembler.cpp.
|
static |
Definition at line 51 of file XtensaDisassembler.cpp.
References T.
Referenced by LLVMInitializeXtensaDisassembler().
|
static |
Definition at line 67 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), ARDecoderTable, llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
Referenced by decodeMem16Operand(), decodeMem32nOperand(), decodeMem32Operand(), and decodeMem8Operand().
|
static |
Definition at line 392 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::MCDisassembler::Success, and TableB4const.
|
static |
Definition at line 402 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::MCDisassembler::Success, and TableB4constu.
|
static |
Definition at line 254 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::MCInst::getOpcode(), llvm::isUInt(), llvm::SignExtend64(), llvm::MCDisassembler::Success, and tryAddingSymbolicOperand().
|
static |
Definition at line 219 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
|
static |
Definition at line 239 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::SignExtend64(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 374 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 111 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
|
static |
Definition at line 309 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::SignExtend64(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 330 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 337 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 348 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 366 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 411 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 301 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::SignExtend64(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 359 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 294 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::SignExtend64(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 247 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::SignExtend64(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 285 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::SignExtend64(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 275 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), llvm::MCDisassembler::Success, and tryAddingSymbolicOperand().
|
static |
Definition at line 426 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), DecodeARRegisterClass(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 442 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), DecodeARRegisterClass(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 434 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), DecodeARRegisterClass(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 418 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), DecodeARRegisterClass(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 89 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
|
static |
Definition at line 100 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
|
static |
Definition at line 78 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
|
static |
Definition at line 382 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 185 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Xtensa::checkRegister(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCInst::getOpcode(), llvm::MCDisassembler::getSubtargetInfo(), Reg, llvm::Xtensa::REGISTER_EXCHANGE, llvm::Xtensa::REGISTER_READ, llvm::Xtensa::REGISTER_WRITE, SRDecoderTable, and llvm::MCDisassembler::Success.
|
static |
Definition at line 316 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 323 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), assert(), llvm::MCOperand::createImm(), llvm::isUInt(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 122 of file XtensaDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Xtensa::checkRegister(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCInst::getOpcode(), llvm::MCDisassembler::getSubtargetInfo(), llvm::Xtensa::getUserRegister(), MRI, Reg, llvm::Xtensa::REGISTER_READ, llvm::Xtensa::REGISTER_WRITE, and llvm::MCDisassembler::Success.
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeXtensaDisassembler | ( | ) |
Definition at line 57 of file XtensaDisassembler.cpp.
References createXtensaDisassembler(), llvm::getTheXtensaTarget(), LLVM_EXTERNAL_VISIBILITY, and llvm::TargetRegistry::RegisterMCDisassembler().
|
static |
Read two bytes from the ArrayRef and return 16 bit data sorted according to the given endianness.
Definition at line 452 of file XtensaDisassembler.cpp.
References llvm::MCDisassembler::Fail, llvm::report_fatal_error(), Size, llvm::ArrayRef< T >::size(), and llvm::MCDisassembler::Success.
|
static |
Read three bytes from the ArrayRef and return 24 bit data.
Definition at line 471 of file XtensaDisassembler.cpp.
References llvm::MCDisassembler::Fail, llvm::report_fatal_error(), Size, llvm::ArrayRef< T >::size(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 230 of file XtensaDisassembler.cpp.
References isBranch(), MI, llvm::Offset, and llvm::MCDisassembler::tryAddingSymbolicOperand().
Referenced by decodeBranchOperand(), and decodeLoopOperand().
Definition at line 62 of file XtensaDisassembler.cpp.
Referenced by DecodeARRegisterClass().
const DecodeRegister SRDecoderTable[] |
Definition at line 149 of file XtensaDisassembler.cpp.
Referenced by DecodeSRRegisterClass().
|
static |
Definition at line 390 of file XtensaDisassembler.cpp.
Referenced by decodeB4constOperand().
|
static |
Definition at line 400 of file XtensaDisassembler.cpp.
Referenced by decodeB4constuOperand().