LLVM
8.0.1
|
#include "MCTargetDesc/SparcMCTargetDesc.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCFixedLenDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/Support/TargetRegistry.h"
#include "SparcGenDisassemblerTables.inc"
Go to the source code of this file.
Namespaces | |
llvm | |
This class represents lattice values for constants. | |
Macros | |
#define | DEBUG_TYPE "sparc-disassembler" |
Typedefs | |
typedef MCDisassembler::DecodeStatus | DecodeStatus |
typedef DecodeStatus(* | DecodeFunc) (MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder) |
Functions | |
Target & | llvm::getTheSparcTarget () |
Target & | llvm::getTheSparcV9Target () |
Target & | llvm::getTheSparcelTarget () |
static MCDisassembler * | createSparcDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) |
void | LLVMInitializeSparcDisassembler () |
static DecodeStatus | DecodeIntRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeI64RegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeFPRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeDFPRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeQFPRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeCPRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeFCCRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeASRRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodePRRegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeIntPairRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeCPPairRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeLoadInt (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeLoadIntPair (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeLoadFP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeLoadDFP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeLoadQFP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeLoadCP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeLoadCPPair (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeStoreInt (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeStoreIntPair (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeStoreFP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeStoreDFP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeStoreQFP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeStoreCP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeStoreCPPair (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeCall (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeSIMM13 (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeJMPL (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeReturn (MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeSWAP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeTRAP (MCInst &Inst, unsigned insn, uint64_t Address, const void *Decoder) |
static DecodeStatus | readInstruction32 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn, bool IsLittleEndian) |
Read four bytes from the ArrayRef and return 32 bit word. More... | |
static DecodeStatus | DecodeMem (MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder, bool isLoad, DecodeFunc DecodeRD) |
static bool | tryAddingSymbolicOperand (int64_t Value, bool isBranch, uint64_t Address, uint64_t Offset, uint64_t Width, MCInst &MI, const void *Decoder) |
Variables | |
static const unsigned | IntRegDecoderTable [] |
static const unsigned | FPRegDecoderTable [] |
static const unsigned | DFPRegDecoderTable [] |
static const unsigned | QFPRegDecoderTable [] |
static const unsigned | FCCRegDecoderTable [] |
static const unsigned | ASRRegDecoderTable [] |
static const unsigned | PRRegDecoderTable [] |
static const uint16_t | IntPairDecoderTable [] |
static const unsigned | CPRegDecoderTable [] |
static const uint16_t | CPPairDecoderTable [] |
#define DEBUG_TYPE "sparc-disassembler" |
Definition at line 24 of file SparcDisassembler.cpp.
typedef DecodeStatus(* DecodeFunc) (MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder) |
Definition at line 375 of file SparcDisassembler.cpp.
Definition at line 26 of file SparcDisassembler.cpp.
|
static |
Definition at line 50 of file SparcDisassembler.cpp.
Referenced by LLVMInitializeSparcDisassembler().
|
static |
Definition at line 233 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 518 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), llvm::MCDisassembler::Success, and tryAddingSymbolicOperand().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 266 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Address, CPPairDecoderTable, llvm::MCOperand::createReg(), DecodeCall(), DecodeJMPL(), DecodeLoadCP(), DecodeLoadCPPair(), DecodeLoadDFP(), DecodeLoadFP(), DecodeLoadInt(), DecodeLoadIntPair(), DecodeLoadQFP(), DecodeReturn(), DecodeSIMM13(), DecodeStoreCP(), DecodeStoreCPPair(), DecodeStoreDFP(), DecodeStoreFP(), DecodeStoreInt(), DecodeStoreIntPair(), DecodeStoreQFP(), DecodeSWAP(), DecodeTRAP(), llvm::MCDisassembler::Fail, MI, and llvm::MCDisassembler::Success.
Referenced by DecodeLoadCPPair(), and DecodeStoreCPPair().
|
static |
Definition at line 213 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeLoadCP(), and DecodeStoreCP().
|
static |
Definition at line 187 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeLoadDFP(), and DecodeStoreDFP().
|
static |
Definition at line 224 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 175 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeLoadFP(), and DecodeStoreFP().
|
static |
Definition at line 163 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
|
static |
Definition at line 251 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, IntPairDecoderTable, llvm::MCDisassembler::SoftFail, and llvm::MCDisassembler::Success.
Referenced by DecodeLoadIntPair(), and DecodeStoreIntPair().
|
static |
Definition at line 152 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeJMPL(), DecodeLoadInt(), DecodeMem(), DecodeReturn(), DecodeStoreInt(), DecodeSWAP(), and DecodeTRAP().
|
static |
Definition at line 535 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), DecodeIntRegsRegisterClass(), llvm::sys::fs::status(), and llvm::MCDisassembler::Success.
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 455 of file SparcDisassembler.cpp.
References DecodeCPRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 461 of file SparcDisassembler.cpp.
References DecodeCPPairRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 443 of file SparcDisassembler.cpp.
References DecodeDFPRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 437 of file SparcDisassembler.cpp.
References DecodeFPRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 425 of file SparcDisassembler.cpp.
References DecodeIntRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 431 of file SparcDisassembler.cpp.
References DecodeIntPairRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 449 of file SparcDisassembler.cpp.
References DecodeMem(), and DecodeQFPRegsRegisterClass().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 378 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), DecodeIntRegsRegisterClass(), llvm::sys::fs::status(), and llvm::MCDisassembler::Success.
Referenced by DecodeLoadCP(), DecodeLoadCPPair(), DecodeLoadDFP(), DecodeLoadFP(), DecodeLoadInt(), DecodeLoadIntPair(), DecodeLoadQFP(), DecodeStoreCP(), DecodeStoreCPPair(), DecodeStoreDFP(), DecodeStoreFP(), DecodeStoreInt(), DecodeStoreIntPair(), and DecodeStoreQFP().
|
static |
Definition at line 242 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::array_lengthof(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, and llvm::MCDisassembler::Success.
|
static |
Definition at line 199 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::MCDisassembler::Fail, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeLoadQFP(), and DecodeStoreQFP().
|
static |
Definition at line 569 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), DecodeIntRegsRegisterClass(), llvm::sys::fs::status(), and llvm::MCDisassembler::Success.
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 528 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and llvm::MCDisassembler::Success.
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 497 of file SparcDisassembler.cpp.
References DecodeCPRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 503 of file SparcDisassembler.cpp.
References DecodeCPPairRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 485 of file SparcDisassembler.cpp.
References DecodeDFPRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 479 of file SparcDisassembler.cpp.
References DecodeFPRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 467 of file SparcDisassembler.cpp.
References DecodeIntRegsRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 473 of file SparcDisassembler.cpp.
References DecodeIntPairRegisterClass(), and DecodeMem().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 491 of file SparcDisassembler.cpp.
References DecodeMem(), and DecodeQFPRegsRegisterClass().
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 597 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), DecodeIntRegsRegisterClass(), llvm::sys::fs::status(), and llvm::MCDisassembler::Success.
Referenced by DecodeCPPairRegisterClass().
|
static |
Definition at line 637 of file SparcDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), DecodeIntRegsRegisterClass(), llvm::sys::fs::status(), and llvm::MCDisassembler::Success.
Referenced by DecodeCPPairRegisterClass().
void LLVMInitializeSparcDisassembler | ( | ) |
Definition at line 57 of file SparcDisassembler.cpp.
References createSparcDisassembler(), llvm::getTheSparcelTarget(), llvm::getTheSparcTarget(), llvm::getTheSparcV9Target(), and llvm::TargetRegistry::RegisterMCDisassembler().
|
static |
Read four bytes from the ArrayRef and return 32 bit word.
Definition at line 320 of file SparcDisassembler.cpp.
References llvm::Address, llvm::X86Disassembler::decodeInstruction(), llvm::MCDisassembler::Fail, Size, llvm::ArrayRef< T >::size(), and llvm::MCDisassembler::Success.
|
static |
Definition at line 509 of file SparcDisassembler.cpp.
References llvm::MCDisassembler::tryAddingSymbolicOperand().
Referenced by DecodeCall().
Definition at line 110 of file SparcDisassembler.cpp.
|
static |
Definition at line 145 of file SparcDisassembler.cpp.
Referenced by DecodeCPPairRegisterClass().
Definition at line 133 of file SparcDisassembler.cpp.
Definition at line 87 of file SparcDisassembler.cpp.
Definition at line 107 of file SparcDisassembler.cpp.
Definition at line 77 of file SparcDisassembler.cpp.
|
static |
Definition at line 126 of file SparcDisassembler.cpp.
Referenced by DecodeIntPairRegisterClass().
Definition at line 67 of file SparcDisassembler.cpp.
Referenced by DecodeIntRegsRegisterClass().
Definition at line 120 of file SparcDisassembler.cpp.
Definition at line 97 of file SparcDisassembler.cpp.