LLVM  10.0.0svn
Macros | Typedefs | Functions
RISCVDisassembler.cpp File Reference
#include "MCTargetDesc/RISCVMCTargetDesc.h"
#include "TargetInfo/RISCVTargetInfo.h"
#include "Utils/RISCVBaseInfo.h"
#include "llvm/CodeGen/Register.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/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/TargetRegistry.h"
#include "RISCVGenDisassemblerTables.inc"
Include dependency graph for RISCVDisassembler.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "riscv-disassembler"
 

Typedefs

typedef MCDisassembler::DecodeStatus DecodeStatus
 

Functions

static MCDisassemblercreateRISCVDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
void LLVMInitializeRISCVDisassembler ()
 
static DecodeStatus DecodeGPRRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFPR32RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFPR32CRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFPR64RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFPR64CRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGPRNoX0RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGPRNoX0X2RegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGPRCRegisterClass (MCInst &Inst, uint64_t RegNo, uint64_t Address, const void *Decoder)
 
static void addImplySP (MCInst &Inst, int64_t Address, const void *Decoder)
 
template<unsigned N>
static DecodeStatus decodeUImmOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder)
 
template<unsigned N>
static DecodeStatus decodeUImmNonZeroOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder)
 
template<unsigned N>
static DecodeStatus decodeSImmOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder)
 
template<unsigned N>
static DecodeStatus decodeSImmNonZeroOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder)
 
template<unsigned N>
static DecodeStatus decodeSImmOperandAndLsl1 (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder)
 
static DecodeStatus decodeCLUIImmOperand (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder)
 
static DecodeStatus decodeFRMArg (MCInst &Inst, uint64_t Imm, int64_t Address, const void *Decoder)
 
static DecodeStatus decodeRVCInstrSImm (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeRVCInstrRdSImm (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeRVCInstrRdRs1UImm (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeRVCInstrRdRs2 (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus decodeRVCInstrRdRs1Rs2 (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "riscv-disassembler"

Definition at line 28 of file RISCVDisassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 30 of file RISCVDisassembler.cpp.

Function Documentation

◆ addImplySP()

static void addImplySP ( MCInst Inst,
int64_t  Address,
const void *  Decoder 
)
static

◆ createRISCVDisassembler()

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

Definition at line 46 of file RISCVDisassembler.cpp.

Referenced by LLVMInitializeRISCVDisassembler().

◆ decodeCLUIImmOperand()

static DecodeStatus decodeCLUIImmOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const void *  Decoder 
)
static

◆ DecodeFPR32CRegisterClass()

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

◆ DecodeFPR32RegisterClass()

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

◆ DecodeFPR64CRegisterClass()

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

◆ DecodeFPR64RegisterClass()

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

◆ decodeFRMArg()

static DecodeStatus decodeFRMArg ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const void *  Decoder 
)
static

◆ DecodeGPRCRegisterClass()

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

◆ DecodeGPRNoX0RegisterClass()

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

◆ DecodeGPRNoX0X2RegisterClass()

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

◆ DecodeGPRRegisterClass()

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

◆ decodeRVCInstrRdRs1Rs2()

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

◆ decodeRVCInstrRdRs1UImm()

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

◆ decodeRVCInstrRdRs2()

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

Definition at line 295 of file RISCVDisassembler.cpp.

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

Referenced by decodeFRMArg().

◆ decodeRVCInstrRdSImm()

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

◆ decodeRVCInstrSImm()

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

Definition at line 260 of file RISCVDisassembler.cpp.

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

Referenced by decodeFRMArg().

◆ decodeSImmNonZeroOperand()

template<unsigned N>
static DecodeStatus decodeSImmNonZeroOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const void *  Decoder 
)
static

Definition at line 199 of file RISCVDisassembler.cpp.

References llvm::Address, and llvm::MCDisassembler::Fail.

◆ decodeSImmOperand()

template<unsigned N>
static DecodeStatus decodeSImmOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const void *  Decoder 
)
static

◆ decodeSImmOperandAndLsl1()

template<unsigned N>
static DecodeStatus decodeSImmOperandAndLsl1 ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const void *  Decoder 
)
static

◆ decodeUImmNonZeroOperand()

template<unsigned N>
static DecodeStatus decodeUImmNonZeroOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const void *  Decoder 
)
static

Definition at line 180 of file RISCVDisassembler.cpp.

References llvm::Address, and llvm::MCDisassembler::Fail.

◆ decodeUImmOperand()

template<unsigned N>
static DecodeStatus decodeUImmOperand ( MCInst Inst,
uint64_t  Imm,
int64_t  Address,
const void *  Decoder 
)
static

◆ LLVMInitializeRISCVDisassembler()

void LLVMInitializeRISCVDisassembler ( )