LLVM 20.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/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDecoderOps.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/TargetRegistry.h"
#include "AVRGenDisassemblerTables.inc"

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 MCDisassembler *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 MCDisassembler *Decoder)
 
static DecodeStatus DecodeLD8RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFIOARr (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFIORdA (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFIOBIT (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeCallTarget (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFRd (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFLPMX (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFFMULRdRr (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFMOVWRdRr (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFWRdK (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFMUL2RdRr (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeMemri (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeFBRk (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeCondBranch (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeLoadStore (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *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 31 of file AVRDisassembler.cpp.

Typedef Documentation

◆ DecodeFunc

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

Definition at line 530 of file AVRDisassembler.cpp.

◆ DecodeStatus

Definition at line 33 of file AVRDisassembler.cpp.

Function Documentation

◆ createAVRDisassembler()

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

Definition at line 50 of file AVRDisassembler.cpp.

Referenced by LLVMInitializeAVRDisassembler().

◆ decodeCallTarget()

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

◆ decodeCondBranch()

static DecodeStatus decodeCondBranch ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeFBRk()

static DecodeStatus decodeFBRk ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeFFMULRdRr()

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

◆ decodeFIOARr()

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

◆ decodeFIOBIT()

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

◆ decodeFIORdA()

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

◆ decodeFLPMX()

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

◆ decodeFMOVWRdRr()

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

◆ decodeFMUL2RdRr()

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

◆ decodeFRd()

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

◆ decodeFWRdK()

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

◆ DecodeGPR8RegisterClass()

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

◆ DecodeLD8RegisterClass()

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

◆ decodeLoadStore()

static DecodeStatus decodeLoadStore ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeMemri()

static DecodeStatus decodeMemri ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ getDecoderTable()

static const uint8_t * getDecoderTable ( uint64_t  Size)
static

Definition at line 464 of file AVRDisassembler.cpp.

References llvm_unreachable, and 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 62 of file AVRDisassembler.cpp.

Referenced by DecodeGPR8RegisterClass(), DecodeLD8RegisterClass(), and decodeLoadStore().