LLVM 20.0.0git
Macros | Typedefs | Functions | Variables
BPFDisassembler.cpp File Reference
#include "MCTargetDesc/BPFMCTargetDesc.h"
#include "TargetInfo/BPFTargetInfo.h"
#include "llvm/ADT/ArrayRef.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 "llvm/Support/MathExtras.h"
#include "llvm/TargetParser/SubtargetFeature.h"
#include <cstdint>
#include "BPFGenDisassemblerTables.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "bpf-disassembler"
 

Typedefs

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

Functions

static MCDisassemblercreateBPFDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFDisassembler ()
 
static DecodeStatus DecodeGPRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t, const MCDisassembler *)
 
static DecodeStatus DecodeGPR32RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t, const MCDisassembler *)
 
static DecodeStatus decodeMemoryOpValue (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus readInstruction64 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint64_t &Insn, bool IsLittleEndian)
 

Variables

static const unsigned GPRDecoderTable []
 
static const unsigned GPR32DecoderTable []
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "bpf-disassembler"

Definition at line 28 of file BPFDisassembler.cpp.

Typedef Documentation

◆ DecodeFunc

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

Definition at line 223 of file BPFDisassembler.cpp.

◆ DecodeStatus

Definition at line 30 of file BPFDisassembler.cpp.

Function Documentation

◆ createBPFDisassembler()

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

Definition at line 79 of file BPFDisassembler.cpp.

Referenced by LLVMInitializeBPFDisassembler().

◆ DecodeGPR32RegisterClass()

static DecodeStatus DecodeGPR32RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  ,
const MCDisassembler  
)
static

◆ DecodeGPRRegisterClass()

static DecodeStatus DecodeGPRRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  ,
const MCDisassembler  
)
static

◆ decodeMemoryOpValue()

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

◆ LLVMInitializeBPFDisassembler()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeBPFDisassembler ( )

◆ readInstruction64()

static DecodeStatus readInstruction64 ( ArrayRef< uint8_t Bytes,
uint64_t  Address,
uint64_t Size,
uint64_t Insn,
bool  IsLittleEndian 
)
static

Variable Documentation

◆ GPR32DecoderTable

const unsigned GPR32DecoderTable[]
static
Initial value:
= {
BPF::W0, BPF::W1, BPF::W2, BPF::W3, BPF::W4, BPF::W5,
BPF::W6, BPF::W7, BPF::W8, BPF::W9, BPF::W10, BPF::W11}

Definition at line 111 of file BPFDisassembler.cpp.

Referenced by DecodeGPR32RegisterClass().

◆ GPRDecoderTable

const unsigned GPRDecoderTable[]
static
Initial value:
= {
BPF::R0, BPF::R1, BPF::R2, BPF::R3, BPF::R4, BPF::R5,
BPF::R6, BPF::R7, BPF::R8, BPF::R9, BPF::R10, BPF::R11}

Definition at line 96 of file BPFDisassembler.cpp.

Referenced by DecodeGPRRegisterClass(), and decodeMemoryOpValue().