LLVM 20.0.0git
Macros | Typedefs | Functions
MipsDisassembler.cpp File Reference
#include "MCTargetDesc/MipsMCTargetDesc.h"
#include "Mips.h"
#include "TargetInfo/MipsTargetInfo.h"
#include "llvm/ADT/ArrayRef.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/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include "MipsGenDisassemblerTables.inc"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "mips-disassembler"
 

Typedefs

using DecodeStatus = MCDisassembler::DecodeStatus
 

Functions

static DecodeStatus DecodeGPR64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCPU16RegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGPRMM16RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGPRMM16ZeroRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGPRMM16MovePRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeGPR32RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodePtrRegisterClass (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeDSPRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFGR64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFGR32RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCCRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFCCRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFGRCCRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeHWRegsRegisterClass (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeAFGR64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeACC64DSPRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeHI32DSPRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeLO32DSPRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMSA128BRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMSA128HRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMSA128WRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMSA128DRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMSACtrlRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCOP0RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCOP2RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget1SImm16 (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeJumpTarget (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget21 (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget21MM (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget26 (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget7MM (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget10MM (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTargetMM (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeBranchTarget26MM (MCInst &Inst, unsigned Offset, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeJumpTargetMM (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeJumpTargetXMM (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMem (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemEVA (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeLoadByte15 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCacheOp (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCacheeOp_CacheOpR6 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeCacheOpMM (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodePrefeOpMM (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSyncI (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSyncI_MM (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSynciR6 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMSA128Mem (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemMMImm4 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemMMSPImm5Lsl2 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemMMGPImm7Lsl2 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemMMReglistImm4Lsl2 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemMMImm9 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemMMImm12 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMemMMImm16 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFMem (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFMemMMR2 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFMem2 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFMem3 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFMemCop2R6 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFMemCop2MMR6 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSpecial3LlSc (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeAddiur2Simm7 (MCInst &Inst, unsigned Value, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeLi16Imm (MCInst &Inst, unsigned Value, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodePOOL16BEncodedField (MCInst &Inst, unsigned Value, uint64_t Address, const MCDisassembler *Decoder)
 
template<unsigned Bits, int Offset, int Scale>
static DecodeStatus DecodeUImmWithOffsetAndScale (MCInst &Inst, unsigned Value, uint64_t Address, const MCDisassembler *Decoder)
 
template<unsigned Bits, int Offset>
static DecodeStatus DecodeUImmWithOffset (MCInst &Inst, unsigned Value, uint64_t Address, const MCDisassembler *Decoder)
 
template<unsigned Bits, int Offset = 0, int ScaleBy = 1>
static DecodeStatus DecodeSImmWithOffsetAndScale (MCInst &Inst, unsigned Value, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeInsSize (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSimm19Lsl2 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSimm18Lsl3 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSimm9SP (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeANDI16Imm (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeSimm23Lsl2 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeINSVE_DF (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 INSVE_[BHWD] have an implicit operand that the generated decoder doesn't handle.
 
template<typename InsnType >
static DecodeStatus DecodeDAHIDATIMMR6 (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeDAHIDATI (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeAddiGroupBranch (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodePOP35GroupBranchMMR6 (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeDaddiGroupBranch (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodePOP37GroupBranchMMR6 (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodePOP65GroupBranchMMR6 (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodePOP75GroupBranchMMR6 (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeBlezlGroupBranch (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeBgtzlGroupBranch (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeBgtzGroupBranch (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeBlezGroupBranch (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeBgtzGroupBranchMMR6 (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeBlezGroupBranchMMR6 (MCInst &MI, InsnType insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeDINS (MCInst &MI, InsnType Insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeDEXT (MCInst &MI, InsnType Insn, uint64_t Address, const MCDisassembler *Decoder)
 
template<typename InsnType >
static DecodeStatus DecodeCRC (MCInst &MI, InsnType Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeRegListOperand (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeRegListOperand16 (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMovePRegPair (MCInst &Inst, unsigned RegPair, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeMovePOperands (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static DecodeStatus DecodeFIXMEInstruction (MCInst &Inst, unsigned Insn, uint64_t Address, const MCDisassembler *Decoder)
 
static MCDisassemblercreateMipsDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
static MCDisassemblercreateMipselDisassembler (const Target &T, const MCSubtargetInfo &STI, MCContext &Ctx)
 
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsDisassembler ()
 
static unsigned getReg (const MCDisassembler *D, unsigned RC, unsigned RegNo)
 
static DecodeStatus readInstruction16 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn, bool IsBigEndian)
 Read two bytes from the ArrayRef and return 16 bit halfword sorted according to the given endianness.
 
static DecodeStatus readInstruction32 (ArrayRef< uint8_t > Bytes, uint64_t Address, uint64_t &Size, uint32_t &Insn, bool IsBigEndian, bool IsMicroMips)
 Read four bytes from the ArrayRef and return 32 bit word sorted according to the given endianness.
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mips-disassembler"

Definition at line 34 of file MipsDisassembler.cpp.

Typedef Documentation

◆ DecodeStatus

Definition at line 36 of file MipsDisassembler.cpp.

Function Documentation

◆ createMipsDisassembler()

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

Definition at line 493 of file MipsDisassembler.cpp.

Referenced by LLVMInitializeMipsDisassembler().

◆ createMipselDisassembler()

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

Definition at line 500 of file MipsDisassembler.cpp.

Referenced by LLVMInitializeMipsDisassembler().

◆ DecodeACC64DSPRegisterClass()

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

◆ DecodeAddiGroupBranch()

template<typename InsnType >
static DecodeStatus DecodeAddiGroupBranch ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeAddiur2Simm7()

static DecodeStatus DecodeAddiur2Simm7 ( MCInst Inst,
unsigned  Value,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeAFGR64RegisterClass()

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

◆ DecodeANDI16Imm()

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

◆ DecodeBgtzGroupBranch()

template<typename InsnType >
static DecodeStatus DecodeBgtzGroupBranch ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBgtzGroupBranchMMR6()

template<typename InsnType >
static DecodeStatus DecodeBgtzGroupBranchMMR6 ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBgtzlGroupBranch()

template<typename InsnType >
static DecodeStatus DecodeBgtzlGroupBranch ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBlezGroupBranch()

template<typename InsnType >
static DecodeStatus DecodeBlezGroupBranch ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBlezGroupBranchMMR6()

template<typename InsnType >
static DecodeStatus DecodeBlezGroupBranchMMR6 ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBlezlGroupBranch()

template<typename InsnType >
static DecodeStatus DecodeBlezlGroupBranch ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget()

static DecodeStatus DecodeBranchTarget ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget10MM()

static DecodeStatus DecodeBranchTarget10MM ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget1SImm16()

static DecodeStatus DecodeBranchTarget1SImm16 ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget21()

static DecodeStatus DecodeBranchTarget21 ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget21MM()

static DecodeStatus DecodeBranchTarget21MM ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget26()

static DecodeStatus DecodeBranchTarget26 ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget26MM()

static DecodeStatus DecodeBranchTarget26MM ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTarget7MM()

static DecodeStatus DecodeBranchTarget7MM ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeBranchTargetMM()

static DecodeStatus DecodeBranchTargetMM ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeCacheeOp_CacheOpR6()

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

◆ DecodeCacheOp()

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

◆ DecodeCacheOpMM()

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

◆ DecodeCCRRegisterClass()

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

◆ DecodeCOP0RegisterClass()

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

◆ DecodeCOP2RegisterClass()

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

◆ DecodeCPU16RegsRegisterClass()

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

Definition at line 1338 of file MipsDisassembler.cpp.

References llvm::MCDisassembler::Fail.

◆ DecodeCRC()

template<typename InsnType >
static DecodeStatus DecodeCRC ( MCInst MI,
InsnType  Insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeDaddiGroupBranch()

template<typename InsnType >
static DecodeStatus DecodeDaddiGroupBranch ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeDAHIDATI()

template<typename InsnType >
static DecodeStatus DecodeDAHIDATI ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeDAHIDATIMMR6()

template<typename InsnType >
static DecodeStatus DecodeDAHIDATIMMR6 ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeDEXT()

template<typename InsnType >
static DecodeStatus DecodeDEXT ( MCInst MI,
InsnType  Insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeDINS()

template<typename InsnType >
static DecodeStatus DecodeDINS ( MCInst MI,
InsnType  Insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeDSPRRegisterClass()

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

Definition at line 1403 of file MipsDisassembler.cpp.

References DecodeGPR32RegisterClass().

◆ DecodeFCCRegisterClass()

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

◆ DecodeFGR32RegisterClass()

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

◆ DecodeFGR64RegisterClass()

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

◆ DecodeFGRCCRegisterClass()

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

◆ DecodeFIXMEInstruction()

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

Definition at line 2524 of file MipsDisassembler.cpp.

References llvm::MCDisassembler::Fail.

◆ DecodeFMem()

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

◆ DecodeFMem2()

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

◆ DecodeFMem3()

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

◆ DecodeFMemCop2MMR6()

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

◆ DecodeFMemCop2R6()

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

◆ DecodeFMemMMR2()

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

◆ DecodeGPR32RegisterClass()

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

◆ DecodeGPR64RegisterClass()

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

◆ DecodeGPRMM16MovePRegisterClass()

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

◆ DecodeGPRMM16RegisterClass()

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

◆ DecodeGPRMM16ZeroRegisterClass()

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

◆ DecodeHI32DSPRegisterClass()

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

◆ DecodeHWRegsRegisterClass()

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

◆ DecodeInsSize()

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

◆ DecodeINSVE_DF()

template<typename InsnType >
static DecodeStatus DecodeINSVE_DF ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeJumpTarget()

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

◆ DecodeJumpTargetMM()

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

◆ DecodeJumpTargetXMM()

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

◆ DecodeLi16Imm()

static DecodeStatus DecodeLi16Imm ( MCInst Inst,
unsigned  Value,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeLO32DSPRegisterClass()

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

◆ DecodeLoadByte15()

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

◆ DecodeMem()

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

◆ DecodeMemEVA()

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

◆ DecodeMemMMGPImm7Lsl2()

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

◆ DecodeMemMMImm12()

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

◆ DecodeMemMMImm16()

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

◆ DecodeMemMMImm4()

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

◆ DecodeMemMMImm9()

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

◆ DecodeMemMMReglistImm4Lsl2()

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

◆ DecodeMemMMSPImm5Lsl2()

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

◆ DecodeMovePOperands()

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

◆ DecodeMovePRegPair()

static DecodeStatus DecodeMovePRegPair ( MCInst Inst,
unsigned  RegPair,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeMSA128BRegisterClass()

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

◆ DecodeMSA128DRegisterClass()

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

◆ DecodeMSA128HRegisterClass()

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

◆ DecodeMSA128Mem()

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

◆ DecodeMSA128WRegisterClass()

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

◆ DecodeMSACtrlRegisterClass()

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

◆ DecodePOOL16BEncodedField()

static DecodeStatus DecodePOOL16BEncodedField ( MCInst Inst,
unsigned  Value,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodePOP35GroupBranchMMR6()

template<typename InsnType >
static DecodeStatus DecodePOP35GroupBranchMMR6 ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodePOP37GroupBranchMMR6()

template<typename InsnType >
static DecodeStatus DecodePOP37GroupBranchMMR6 ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodePOP65GroupBranchMMR6()

template<typename InsnType >
static DecodeStatus DecodePOP65GroupBranchMMR6 ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodePOP75GroupBranchMMR6()

template<typename InsnType >
static DecodeStatus DecodePOP75GroupBranchMMR6 ( MCInst MI,
InsnType  insn,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodePrefeOpMM()

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

◆ DecodePtrRegisterClass()

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

◆ DecodeRegListOperand()

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

◆ DecodeRegListOperand16()

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

◆ DecodeSimm18Lsl3()

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

◆ DecodeSimm19Lsl2()

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

◆ DecodeSimm23Lsl2()

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

◆ DecodeSimm9SP()

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

◆ DecodeSImmWithOffsetAndScale()

template<unsigned Bits, int Offset = 0, int ScaleBy = 1>
static DecodeStatus DecodeSImmWithOffsetAndScale ( MCInst Inst,
unsigned  Value,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ DecodeSpecial3LlSc()

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

◆ DecodeSyncI()

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

◆ DecodeSyncI_MM()

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

◆ DecodeSynciR6()

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

◆ DecodeUImmWithOffset()

template<unsigned Bits, int Offset>
static DecodeStatus DecodeUImmWithOffset ( MCInst Inst,
unsigned  Value,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

Definition at line 352 of file MipsDisassembler.cpp.

◆ DecodeUImmWithOffsetAndScale()

template<unsigned Bits, int Offset, int Scale>
static DecodeStatus DecodeUImmWithOffsetAndScale ( MCInst Inst,
unsigned  Value,
uint64_t  Address,
const MCDisassembler Decoder 
)
static

◆ getReg()

static unsigned getReg ( const MCDisassembler D,
unsigned  RC,
unsigned  RegNo 
)
static

Definition at line 521 of file MipsDisassembler.cpp.

References D.

Referenced by AddNodeIDCustom(), llvm::CombinerHelper::applyCombineInsertVecElts(), llvm::AMDGPUCombinerHelper::applyFoldableFneg(), llvm::CombinerHelper::applyFoldBinOpIntoSelect(), llvm::CombinerHelper::applyShiftOfShiftedLogic(), llvm::AArch64FrameLowering::assignCalleeSavedSpillSlots(), buildCopyToRegs(), llvm::CSEMIRBuilder::buildInstr(), llvm::PPCInstrInfo::canInsertSelect(), llvm::HexagonPacketizerList::canPromoteToNewValueStore(), llvm::GISelKnownBits::computeKnownBitsImpl(), conversionLibcall(), DecodeACC64DSPRegisterClass(), DecodeAddiGroupBranch(), DecodeAFGR64RegisterClass(), DecodeBgtzGroupBranch(), DecodeBgtzGroupBranchMMR6(), DecodeBgtzlGroupBranch(), DecodeBlezGroupBranch(), DecodeBlezGroupBranchMMR6(), DecodeBlezlGroupBranch(), DecodeCacheeOp_CacheOpR6(), DecodeCacheOp(), DecodeCacheOpMM(), DecodeCCRRegisterClass(), DecodeCOP0RegisterClass(), DecodeCOP2RegisterClass(), DecodeCRC(), DecodeDaddiGroupBranch(), DecodeDAHIDATI(), DecodeDAHIDATIMMR6(), DecodeDEXT(), DecodeDINS(), DecodeFCCRegisterClass(), DecodeFGR32RegisterClass(), DecodeFGR64RegisterClass(), DecodeFGRCCRegisterClass(), DecodeFMem(), DecodeFMem2(), DecodeFMem3(), DecodeFMemCop2MMR6(), DecodeFMemCop2R6(), DecodeFMemMMR2(), DecodeGPR32RegisterClass(), DecodeGPR64RegisterClass(), DecodeGPRMM16MovePRegisterClass(), DecodeGPRMM16RegisterClass(), DecodeGPRMM16ZeroRegisterClass(), DecodeHI32DSPRegisterClass(), DecodeLO32DSPRegisterClass(), DecodeLoadByte15(), DecodeMem(), DecodeMemEVA(), DecodeMemMMGPImm7Lsl2(), DecodeMemMMImm12(), DecodeMemMMImm16(), DecodeMemMMImm9(), DecodeMemMMSPImm5Lsl2(), DecodeMSA128BRegisterClass(), DecodeMSA128DRegisterClass(), DecodeMSA128HRegisterClass(), DecodeMSA128Mem(), DecodeMSA128WRegisterClass(), DecodeMSACtrlRegisterClass(), DecodePOP35GroupBranchMMR6(), DecodePOP37GroupBranchMMR6(), DecodePOP65GroupBranchMMR6(), DecodePOP75GroupBranchMMR6(), DecodePrefeOpMM(), DecodeSpecial3LlSc(), DecodeSyncI(), DecodeSyncI_MM(), DecodeSynciR6(), llvm::SIInstrInfo::expandMovDPP64(), llvm::LegalizerHelper::fewerElementsVectorReductions(), llvm::LegalizerHelper::fewerElementsVectorShuffle(), findRenameRegForSameLdStRegPair(), llvm::MachineInstr::getFirst2LLTs(), llvm::MachineInstr::getFirst2Regs(), llvm::MachineInstr::getFirst3LLTs(), llvm::MachineInstr::getFirst3Regs(), llvm::MachineInstr::getFirst4LLTs(), llvm::MachineInstr::getFirst4Regs(), llvm::MachineInstr::getFirst5LLTs(), llvm::MachineInstr::getFirst5Regs(), getMaskSetter(), getMaxCalleeSavedReg(), getUnderlyingArgRegs(), llvm::HexagonInstrInfo::insertBranch(), llvm::PPCInstrInfo::insertBranch(), llvm::XCoreInstrInfo::insertBranch(), llvm::AArch64InstrInfo::insertSelect(), llvm::PPCInstrInfo::insertSelect(), llvm::MachineInstr::isConstantValuePHI(), llvm::AMDGPULegalizerInfo::legalizeAddrSpaceCast(), llvm::AMDGPULegalizerInfo::legalizeAtomicCmpXChg(), llvm::AMDGPULegalizerInfo::legalizeCTLZ_ZERO_UNDEF(), llvm::ARMLegalizerInfo::legalizeCustom(), llvm::AArch64LegalizerInfo::legalizeIntrinsic(), llvm::LegalizerHelper::libcall(), llvm::LegalizerHelper::lowerDIVREM(), llvm::LegalizerHelper::lowerFunnelShiftWithInverse(), llvm::AArch64CallLowering::lowerReturn(), llvm::CombinerHelper::matchCombineFAddFpExtFMulToFMadOrFMAAggressive(), llvm::CombinerHelper::matchCombineFSubFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFSubFNegFMulToFMadOrFMA(), llvm::CombinerHelper::matchCombineFSubFpExtFMulToFMadOrFMA(), mayCombineMisaligned(), llvm::LegalizerHelper::narrowScalar(), llvm::TargetInstrInfo::PredicateInstruction(), llvm::R600InstrInfo::PredicateInstruction(), llvm::ARMBaseInstrInfo::PredicateInstruction(), llvm::PPCInstrInfo::PredicateInstruction(), llvm::RegisterBankInfo::OperandsMapper::print(), llvm::X86FrameLowering::restoreCalleeSavedRegisters(), llvm::PPCInstrInfo::reverseBranchCondition(), llvm::RISCVDAGToDAGISel::selectVLOp(), simpleLibcall(), llvm::X86FrameLowering::spillCalleeSavedRegisters(), splatPartsI64WithVL(), llvm::PPCInstrInfo::SubsumesPredicate(), and llvm::LegalizationArtifactCombiner::tryCombineUnmergeValues().

◆ LLVMInitializeMipsDisassembler()

LLVM_EXTERNAL_VISIBILITY void LLVMInitializeMipsDisassembler ( )

◆ readInstruction16()

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

Read two bytes from the ArrayRef and return 16 bit halfword sorted according to the given endianness.

Definition at line 1107 of file MipsDisassembler.cpp.

References llvm::MCDisassembler::Fail, Insn, llvm::ArrayRef< T >::size(), Size, and llvm::MCDisassembler::Success.

◆ readInstruction32()

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

Read four bytes from the ArrayRef and return 32 bit word sorted according to the given endianness.

Definition at line 1127 of file MipsDisassembler.cpp.

References llvm::MCDisassembler::Fail, Insn, llvm::ArrayRef< T >::size(), Size, and llvm::MCDisassembler::Success.