28 #define DEBUG_TYPE "avr-disassembler" 39 virtual ~AVRDisassembler() {}
50 return new AVRDisassembler(STI, Ctx);
61 uint64_t
Address,
const void *Decoder) {
66 uint64_t
Address,
const void *Decoder) {
71 uint64_t
Address,
const void *Decoder) {
75 #include "AVRGenDisassemblerTables.inc" 79 if (Bytes.
size() < 2) {
85 Insn = (Bytes[0] << 0) | (Bytes[1] << 8);
93 if (Bytes.
size() < 4) {
99 Insn = (Bytes[0] << 0) | (Bytes[1] << 8) | (Bytes[2] << 16) | (Bytes[3] << 24);
107 case 2:
return DecoderTable16;
108 case 4:
return DecoderTable32;
153 const void *Decoder);
This class represents lattice values for constants.
DecodeStatus
Ternary decode status.
Superclass for all disassemblers.
static DecodeStatus readInstruction32(ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn)
static void RegisterMCDisassembler(Target &T, Target::MCDisassemblerCtorTy Fn)
RegisterMCDisassembler - Register a MCDisassembler implementation for the given target.
static DecodeStatus DecodePTRREGSRegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
DecodeStatus(* DecodeFunc)(MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder)
Target & getTheAVRTarget()
static DecodeStatus DecodeLD8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Context object for machine code objects.
Instances of this class represent a single low-level machine instruction.
static MCDisassembler * createAVRDisassembler(const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
size_t size() const
size - Get the array size.
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRDisassembler()
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
#define LLVM_EXTERNAL_VISIBILITY
static const uint8_t * getDecoderTable(uint64_t Size)
Target - Wrapper for Target specific information.
static DecodeStatus DecodeGPR8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
static DecodeStatus readInstruction16(ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn)
Generic base class for all target subtargets.
MCDisassembler::DecodeStatus DecodeStatus
This class implements an extremely fast bulk output stream that can only output to a stream...