LLVM  14.0.0git
Macros | Typedefs | Functions | Variables
AVRDisassembler.cpp File Reference
#include "AVR.h"
#include "AVRRegisterInfo.h"
#include "AVRSubtarget.h"
#include "MCTargetDesc/AVRMCTargetDesc.h"
#include "TargetInfo/AVRTargetInfo.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/MC/TargetRegistry.h"
#include "AVRGenDisassemblerTables.inc"
Include dependency graph for AVRDisassembler.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "avr-disassembler"
 

Typedefs

typedef MCDisassembler::DecodeStatus DecodeStatus
 
typedef DecodeStatus(* DecodeFunc) (MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder)
 

Functions

static MCDisassemblercreateAVRDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRDisassembler ()
 
static DecodeStatus DecodeGPR8RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeLD8RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodePTRREGSRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFIOARr (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFIORdA (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFIOBIT (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeCallTarget (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFRd (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFLPMX (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFFMULRdRr (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFMOVWRdRr (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFWRdK (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeFMUL2RdRr (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus readInstruction16 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn)
 
static DecodeStatus readInstruction32 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn)
 
static const uint8_t * getDecoderTable (uint64_t Size)
 

Variables

static const uint16_t GPRDecoderTable []
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "avr-disassembler"

Definition at line 28 of file AVRDisassembler.cpp.

Typedef Documentation

◆ DecodeFunc

typedef DecodeStatus(* DecodeFunc) (MCInst &MI, unsigned insn, uint64_t Address, const void *Decoder)

Definition at line 325 of file AVRDisassembler.cpp.

◆ DecodeStatus

Definition at line 30 of file AVRDisassembler.cpp.

Function Documentation

◆ createAVRDisassembler()

static MCDisassembler* createAVRDisassembler ( const Target T,
const MCSubtargetInfo STI,
MCContext Ctx 
)
static

Definition at line 47 of file AVRDisassembler.cpp.

Referenced by LLVMInitializeAVRDisassembler().

◆ decodeCallTarget()

static DecodeStatus decodeCallTarget ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFFMULRdRr()

static DecodeStatus decodeFFMULRdRr ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFIOARr()

static DecodeStatus decodeFIOARr ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFIOBIT()

static DecodeStatus decodeFIOBIT ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFIORdA()

static DecodeStatus decodeFIORdA ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFLPMX()

static DecodeStatus decodeFLPMX ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFMOVWRdRr()

static DecodeStatus decodeFMOVWRdRr ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFMUL2RdRr()

static DecodeStatus decodeFMUL2RdRr ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFRd()

static DecodeStatus decodeFRd ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ decodeFWRdK()

static DecodeStatus decodeFWRdK ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeGPR8RegisterClass()

static DecodeStatus DecodeGPR8RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodeLD8RegisterClass()

static DecodeStatus DecodeLD8RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

◆ DecodePTRREGSRegisterClass()

static DecodeStatus DecodePTRREGSRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 89 of file AVRDisassembler.cpp.

References assert(), and llvm::MCDisassembler::Success.

◆ getDecoderTable()

static const uint8_t* getDecoderTable ( uint64_t  Size)
static

Definition at line 272 of file AVRDisassembler.cpp.

References llvm_unreachable, and llvm::Check::Size.

◆ LLVMInitializeAVRDisassembler()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAVRDisassembler ( )

◆ readInstruction16()

static DecodeStatus readInstruction16 ( ArrayRef< uint8_t >  Bytes,
uint64_t  Address,
uint64_t Size,
uint32_t Insn 
)
static

◆ readInstruction32()

static DecodeStatus readInstruction32 ( ArrayRef< uint8_t >  Bytes,
uint64_t  Address,
uint64_t Size,
uint32_t Insn 
)
static

Variable Documentation

◆ GPRDecoderTable

const uint16_t GPRDecoderTable[]
static
Initial value:
= {
AVR::R0, AVR::R1, AVR::R2, AVR::R3, AVR::R4, AVR::R5, AVR::R6,
AVR::R7, AVR::R8, AVR::R9, AVR::R10, AVR::R11, AVR::R12, AVR::R13,
AVR::R14, AVR::R15, AVR::R16, AVR::R17, AVR::R18, AVR::R19, AVR::R20,
AVR::R21, AVR::R22, AVR::R23, AVR::R24, AVR::R25, AVR::R26, AVR::R27,
AVR::R28, AVR::R29, AVR::R30, AVR::R31,
}

Definition at line 59 of file AVRDisassembler.cpp.

Referenced by DecodeGPR8RegisterClass(), and DecodeLD8RegisterClass().

R4
#define R4(n)
R2
#define R2(n)
R6
#define R6(n)