LLVM 20.0.0git
Typedefs | Functions | Variables
LanaiDisassembler.cpp File Reference
#include "LanaiDisassembler.h"
#include "LanaiAluCode.h"
#include "LanaiCondCode.h"
#include "LanaiInstrInfo.h"
#include "TargetInfo/LanaiTargetInfo.h"
#include "llvm/MC/MCDecoderOps.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/MathExtras.h"
#include "LanaiGenDisassemblerTables.inc"

Go to the source code of this file.

Typedefs

typedef MCDisassembler::DecodeStatus DecodeStatus
 

Functions

static MCDisassemblercreateLanaiDisassembler (const Target &, const MCSubtargetInfo &STI, MCContext &Ctx)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiDisassembler ()
 
static DecodeStatus DecodeGPRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeRiMemoryValue (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeRrMemoryValue (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeSplsValue (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeBranch (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodePredicateOperand (MCInst &Inst, unsigned Val, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus decodeShiftImm (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus readInstruction32 (ArrayRef< uint8_t > Bytes, uint64_t &Size, uint32_t &Insn)
 
static void PostOperandDecodeAdjust (MCInst &Instr, uint32_t Insn)
 
static bool tryAddingSymbolicOperand (int64_t Value, bool IsBranch, uint64_t Address, uint64_t Offset, uint64_t Width, MCInst &MI, const MCDisassembler *Decoder)
 

Variables

static const unsigned GPRDecoderTable []
 

Typedef Documentation

◆ DecodeStatus

Definition at line 27 of file LanaiDisassembler.cpp.

Function Documentation

◆ createLanaiDisassembler()

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

Definition at line 29 of file LanaiDisassembler.cpp.

Referenced by LLVMInitializeLanaiDisassembler().

◆ decodeBranch()

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

◆ DecodeGPRRegisterClass()

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

◆ decodePredicateOperand()

static DecodeStatus decodePredicateOperand ( MCInst Inst,
unsigned  Val,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ decodeRiMemoryValue()

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

◆ decodeRrMemoryValue()

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

◆ decodeShiftImm()

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

◆ decodeSplsValue()

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

◆ LLVMInitializeLanaiDisassembler()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeLanaiDisassembler ( )

◆ PostOperandDecodeAdjust()

static void PostOperandDecodeAdjust ( MCInst Instr,
uint32_t  Insn 
)
static

◆ readInstruction32()

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

◆ tryAddingSymbolicOperand()

static bool tryAddingSymbolicOperand ( int64_t  Value,
bool  IsBranch,
uint64_t  Address,
uint64_t  Offset,
uint64_t  Width,
MCInst MI,
const MCDisassembler Decoder 
)
static

Variable Documentation

◆ GPRDecoderTable

const unsigned GPRDecoderTable[]
static
Initial value:
= {
Lanai::R0, Lanai::R1, Lanai::PC, Lanai::R3, Lanai::SP, Lanai::FP,
Lanai::R6, Lanai::R7, Lanai::RV, Lanai::R9, Lanai::RR1, Lanai::RR2,
Lanai::R12, Lanai::R13, Lanai::R14, Lanai::RCA, Lanai::R16, Lanai::R17,
Lanai::R18, Lanai::R19, Lanai::R20, Lanai::R21, Lanai::R22, Lanai::R23,
Lanai::R24, Lanai::R25, Lanai::R26, Lanai::R27, Lanai::R28, Lanai::R29,
Lanai::R30, Lanai::R31}

Definition at line 155 of file LanaiDisassembler.cpp.