LLVM
8.0.1
|
This file is part of the ARC Disassembler. More...
#include "ARC.h"
#include "ARCRegisterInfo.h"
#include "MCTargetDesc/ARCMCTargetDesc.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCFixedLenDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/TargetRegistry.h"
#include "ARCGenDisassemblerTables.inc"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "arc-disassembler" |
Typedefs | |
using | DecodeStatus = MCDisassembler::DecodeStatus |
Functions | |
static bool | readInstruction32 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn) |
static bool | readInstruction64 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint64_t &Insn) |
static bool | readInstruction48 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint64_t &Insn) |
static bool | readInstruction16 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn) |
template<unsigned B> | |
static DecodeStatus | DecodeSignedOperand (MCInst &Inst, unsigned InsnS, uint64_t Address=0, const void *Decoder=nullptr) |
template<unsigned B> | |
static DecodeStatus | DecodeFromCyclicRange (MCInst &Inst, unsigned InsnS, uint64_t Address=0, const void *Decoder=nullptr) |
template<unsigned B> | |
static DecodeStatus | DecodeBranchTargetS (MCInst &Inst, unsigned InsnS, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeMEMrs9 (MCInst &, unsigned, uint64_t, const void *) |
static DecodeStatus | DecodeLdLImmInstruction (MCInst &, uint64_t, uint64_t, const void *) |
static DecodeStatus | DecodeStLImmInstruction (MCInst &, uint64_t, uint64_t, const void *) |
static DecodeStatus | DecodeLdRLImmInstruction (MCInst &, uint64_t, uint64_t, const void *) |
static DecodeStatus | DecodeMoveHRegInstruction (MCInst &Inst, uint64_t, uint64_t, const void *) |
static DecodeStatus | DecodeGPR32RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static DecodeStatus | DecodeGBR32ShortRegister (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder) |
static unsigned | decodeCField (unsigned Insn) |
static unsigned | decodeBField (unsigned Insn) |
static unsigned | decodeAField (unsigned Insn) |
static bool | DecodeSymbolicOperand (MCInst &Inst, uint64_t Address, uint64_t Value, const void *Decoder) |
static void | DecodeSymbolicOperandOff (MCInst &Inst, uint64_t Address, uint64_t Offset, const void *Decoder) |
static MCDisassembler * | createARCDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx) |
void | LLVMInitializeARCDisassembler () |
Variables | |
static const uint16_t | GPR32DecoderTable [] |
This file is part of the ARC Disassembler.
Definition in file ARCDisassembler.cpp.
#define DEBUG_TYPE "arc-disassembler" |
Definition at line 28 of file ARCDisassembler.cpp.
Definition at line 30 of file ARCDisassembler.cpp.
|
static |
Definition at line 362 of file ARCDisassembler.cpp.
References llvm::Target::createMCInstrInfo().
Referenced by LLVMInitializeARCDisassembler().
Definition at line 155 of file ARCDisassembler.cpp.
Referenced by DecodeLdLImmInstruction(), and DecodeLdRLImmInstruction().
Definition at line 150 of file ARCDisassembler.cpp.
Referenced by DecodeLdLImmInstruction(), DecodeLdRLImmInstruction(), and DecodeStLImmInstruction().
|
static |
Definition at line 188 of file ARCDisassembler.cpp.
References B, DecodeSymbolicOperandOff(), and llvm::MCDisassembler::Success.
Referenced by readInstruction16().
Definition at line 146 of file ARCDisassembler.cpp.
Referenced by DecodeLdRLImmInstruction(), and DecodeStLImmInstruction().
|
static |
Definition at line 208 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), B, llvm::MCOperand::createImm(), llvm::max(), and llvm::MCDisassembler::Success.
Referenced by readInstruction16().
|
static |
Definition at line 134 of file ARCDisassembler.cpp.
References DecodeGPR32RegisterClass().
|
static |
Definition at line 121 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createReg(), llvm::dbgs(), llvm::MCDisassembler::Fail, GPR32DecoderTable, LLVM_DEBUG, Reg, and llvm::MCDisassembler::Success.
Referenced by DecodeGBR32ShortRegister(), DecodeLdLImmInstruction(), DecodeLdRLImmInstruction(), DecodeMEMrs9(), DecodeMoveHRegInstruction(), and DecodeStLImmInstruction().
|
static |
Definition at line 236 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), llvm::dbgs(), decodeAField(), decodeBField(), DecodeGPR32RegisterClass(), llvm::MCDisassembler::Fail, LLVM_DEBUG, and llvm::MCDisassembler::Success.
Referenced by readInstruction16().
|
static |
Definition at line 254 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), llvm::dbgs(), decodeAField(), decodeBField(), decodeCField(), DecodeGPR32RegisterClass(), llvm::MCDisassembler::Fail, LLVM_DEBUG, and llvm::MCDisassembler::Success.
Referenced by readInstruction16().
|
static |
Definition at line 159 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), DecodeGPR32RegisterClass(), and llvm::MCDisassembler::Success.
Referenced by readInstruction16().
|
static |
Definition at line 271 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::Address, llvm::MCOperand::createImm(), llvm::dbgs(), DecodeGPR32RegisterClass(), llvm::X86Disassembler::decodeInstruction(), llvm::MCDisassembler::Fail, Fail, llvm::tgtok::Field, LLVM_DEBUG, readInstruction16(), readInstruction32(), readInstruction48(), readInstruction64(), Size, llvm::ArrayRef< T >::size(), llvm::MCDisassembler::Success, and Success.
Referenced by readInstruction16().
|
static |
Definition at line 197 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), B, llvm::MCOperand::createImm(), llvm::maskTrailingOnes(), and llvm::MCDisassembler::Success.
Referenced by llvm::codeview::BinaryAnnotationIterator::operator*(), and readInstruction16().
|
static |
Definition at line 219 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), llvm::dbgs(), decodeBField(), decodeCField(), DecodeGPR32RegisterClass(), llvm::MCDisassembler::Fail, LLVM_DEBUG, and llvm::MCDisassembler::Success.
Referenced by readInstruction16().
|
static |
Definition at line 169 of file ARCDisassembler.cpp.
Referenced by DecodeSymbolicOperandOff().
|
static |
Definition at line 179 of file ARCDisassembler.cpp.
References llvm::MCInst::addOperand(), llvm::MCOperand::createImm(), and DecodeSymbolicOperand().
Referenced by DecodeBranchTargetS().
void LLVMInitializeARCDisassembler | ( | ) |
Definition at line 368 of file ARCDisassembler.cpp.
References createARCDisassembler(), llvm::getTheARCTarget(), and llvm::TargetRegistry::RegisterMCDisassembler().
|
static |
Definition at line 79 of file ARCDisassembler.cpp.
References llvm::Address, DecodeBranchTargetS(), DecodeFromCyclicRange(), DecodeLdLImmInstruction(), DecodeLdRLImmInstruction(), DecodeMEMrs9(), DecodeMoveHRegInstruction(), DecodeSignedOperand(), and DecodeStLImmInstruction().
Referenced by DecodeMoveHRegInstruction().
|
static |
Definition at line 51 of file ARCDisassembler.cpp.
Referenced by DecodeMoveHRegInstruction().
|
static |
Definition at line 70 of file ARCDisassembler.cpp.
Referenced by DecodeMoveHRegInstruction().
|
static |
Definition at line 60 of file ARCDisassembler.cpp.
Referenced by DecodeMoveHRegInstruction().
|
static |
Definition at line 114 of file ARCDisassembler.cpp.
Referenced by DecodeGPR32RegisterClass().