28 #define DEBUG_TYPE "avr-disassembler" 39 virtual ~AVRDisassembler() {}
51 return new AVRDisassembler(STI, Ctx);
62 uint64_t
Address,
const void *Decoder) {
67 uint64_t
Address,
const void *Decoder) {
72 uint64_t
Address,
const void *Decoder) {
76 #include "AVRGenDisassemblerTables.inc" 80 if (Bytes.
size() < 2) {
86 Insn = (Bytes[0] << 0) | (Bytes[1] << 8);
94 if (Bytes.
size() < 4) {
100 Insn = (Bytes[0] << 0) | (Bytes[1] << 8) | (Bytes[2] << 16) | (Bytes[3] << 24);
108 case 2:
return DecoderTable16;
109 case 4:
return DecoderTable32;
155 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()
void LLVMInitializeAVRDisassembler()
static DecodeStatus DecodeLD8RegisterClass(MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
Context object for machine code objects.
int decodeInstruction(InternalInstruction *insn, byteReader_t reader, const void *readerArg, dlog_t logger, void *loggerArg, const void *miiArg, uint64_t startLoc, DisassemblerMode mode)
Decode one instruction and store the decoding results in a buffer provided by the consumer...
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.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
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...