LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Typedefs | Functions | Variables
MipsDisassembler.cpp File Reference
#include "Mips.h"
#include "MipsRegisterInfo.h"
#include "MipsSubtarget.h"
#include "llvm/MC/MCDisassembler.h"
#include "llvm/MC/MCFixedLenDisassembler.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryObject.h"
#include "llvm/Support/TargetRegistry.h"
#include "MipsGenDisassemblerTables.inc"
Include dependency graph for MipsDisassembler.cpp:

Go to the source code of this file.

Namespaces

 llvm
 List of target independent CodeGen pass IDs.
 

Typedefs

typedef
MCDisassembler::DecodeStatus 
DecodeStatus
 

Functions

static DecodeStatus DecodeGPR64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeCPU16RegsRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeGPR32RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodePtrRegisterClass (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeDSPRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFGR64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFGR32RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFGRH32RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeCCRRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFCCRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeHWRegsRegisterClass (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeAFGR64RegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeACC64DSPRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeHI32DSPRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeLO32DSPRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMSA128BRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMSA128HRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMSA128WRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMSA128DRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMSACtrlRegisterClass (MCInst &Inst, unsigned RegNo, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeBranchTarget (MCInst &Inst, unsigned Offset, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeJumpTarget (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeBranchTargetMM (MCInst &Inst, unsigned Offset, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeJumpTargetMM (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMem (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMSA128Mem (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMemMMImm12 (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeMemMMImm16 (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeFMem (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeSimm16 (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeLSAImm (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeInsSize (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static DecodeStatus DecodeExtSize (MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder)
 
static MCDisassemblercreateMipsDisassembler (const Target &T, const MCSubtargetInfo &STI)
 
static MCDisassemblercreateMipselDisassembler (const Target &T, const MCSubtargetInfo &STI)
 
static MCDisassemblercreateMips64Disassembler (const Target &T, const MCSubtargetInfo &STI)
 
static MCDisassemblercreateMips64elDisassembler (const Target &T, const MCSubtargetInfo &STI)
 
void LLVMInitializeMipsDisassembler ()
 
static DecodeStatus readInstruction32 (const MemoryObject &region, uint64_t address, uint64_t &size, uint32_t &insn, bool isBigEndian, bool IsMicroMips)
 
static unsigned getReg (const void *D, unsigned RC, unsigned RegNo)
 

Variables

Target llvm::TheMipselTarget
 
Target llvm::TheMipsTarget
 
Target llvm::TheMips64Target
 
Target llvm::TheMips64elTarget
 

Typedef Documentation

Definition at line 27 of file MipsDisassembler.cpp.

Function Documentation

static MCDisassembler* createMips64Disassembler ( const Target T,
const MCSubtargetInfo STI 
)
static

Definition at line 283 of file MipsDisassembler.cpp.

References llvm::Target::createMCRegInfo().

Referenced by LLVMInitializeMipsDisassembler().

static MCDisassembler* createMips64elDisassembler ( const Target T,
const MCSubtargetInfo STI 
)
static

Definition at line 289 of file MipsDisassembler.cpp.

References llvm::Target::createMCRegInfo().

Referenced by LLVMInitializeMipsDisassembler().

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

Definition at line 271 of file MipsDisassembler.cpp.

References llvm::Target::createMCRegInfo().

Referenced by LLVMInitializeMipsDisassembler().

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

Definition at line 277 of file MipsDisassembler.cpp.

References llvm::Target::createMCRegInfo().

Referenced by LLVMInitializeMipsDisassembler().

static DecodeStatus DecodeACC64DSPRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeAFGR64RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeBranchTarget ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeBranchTargetMM ( MCInst Inst,
unsigned  Offset,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeCCRRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeCPU16RegsRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 427 of file MipsDisassembler.cpp.

References llvm::MCDisassembler::Fail.

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

Definition at line 470 of file MipsDisassembler.cpp.

References DecodeGPR32RegisterClass().

static DecodeStatus DecodeExtSize ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeFCCRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeFGR32RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeFGR64RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeFGRH32RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeFMem ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeGPR32RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeGPR64RegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeHI32DSPRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeHWRegsRegisterClass ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeInsSize ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeJumpTarget ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeJumpTargetMM ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeLO32DSPRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeLSAImm ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMem ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMemMMImm12 ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMemMMImm16 ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMSA128BRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMSA128DRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMSA128HRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMSA128Mem ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMSA128WRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodeMSACtrlRegisterClass ( MCInst Inst,
unsigned  RegNo,
uint64_t  Address,
const void *  Decoder 
)
static
static DecodeStatus DecodePtrRegisterClass ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static

Definition at line 460 of file MipsDisassembler.cpp.

References DecodeGPR32RegisterClass(), and DecodeGPR64RegisterClass().

static DecodeStatus DecodeSimm16 ( MCInst Inst,
unsigned  Insn,
uint64_t  Address,
const void *  Decoder 
)
static
static unsigned getReg ( const void *  D,
unsigned  RC,
unsigned  RegNo 
)
static
void LLVMInitializeMipsDisassembler ( )
static DecodeStatus readInstruction32 ( const MemoryObject region,
uint64_t  address,
uint64_t &  size,
uint32_t &  insn,
bool  isBigEndian,
bool  IsMicroMips 
)
static

readInstruction - read four bytes from the MemoryObject and return 32 bit word sorted according to the given endianess

Definition at line 312 of file MipsDisassembler.cpp.

References llvm::MCDisassembler::Fail, llvm::MemoryObject::readBytes(), and llvm::MCDisassembler::Success.