Nugget
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
Mips::Decoder::Instruction Struct Reference

#include <common/util/decoder.hh>

Public Types

enum  Mnemonic {
  ADD , ADDU , ADDI , ADDIU ,
  SUB , SUBU , SLT , SLTU ,
  SLTI , SLTIU , DIV , DIVU ,
  MULT , MULTU , AND , ANDI ,
  OR , ORI , XOR , XORI ,
  NOR , SLL , SRL , SRA ,
  SLLV , SRLV , SRAV , LB ,
  LBU , LH , LHU , LUI ,
  LW , LWL , LWR , SB ,
  SH , SW , SWL , SWR ,
  BEQ , BNE , BGEZ , BGTZ ,
  BLEZ , BLTZ , BGEZAL , BLTZAL ,
  J , JAL , JR , JALR ,
  MFHI , MTHI , MFLO , MTLO ,
  BREAK , SYSCALL , MFC0 , MTC0 ,
  CFC0 , CTC0 , MFC2 , MTC2 ,
  CFC2 , CTC2 , SWC2 , LWC2 ,
  INVALID
}
 

Public Member Functions

 Instruction (uint32_t opcode)
 
uint32_t opcode () const
 
uint32_t funct () const
 
uint32_t rs () const
 
uint32_t rt () const
 
uint32_t rd () const
 
uint32_t sa () const
 
int32_t imm () const
 
uint32_t target () const
 
int32_t offset () const
 
uint32_t cop () const
 
uint32_t copFunc () const
 
Mnemonic mnemonic () const
 
bool isLoad () const
 
bool isStore () const
 
uint32_t getLoadAddress (GPRRegs &gpr) const
 
uint32_t getStoreAddress (GPRRegs &gpr) const
 
uint32_t getLoadMask (GPRRegs &gpr) const
 
uint32_t getValueToStore (GPRRegs &gpr, uint32_t cop2regs[32]) const
 
uint32_t getStoreMask (GPRRegs &gpr) const
 
uint32_t getBranchAddress (uint32_t pc) const
 
uint32_t getJumpAddress (uint32_t pc) const
 
uint32_t getJumpRegisterAddress (GPRRegs &gpr) const
 

Public Attributes

uint32_t code
 

Member Enumeration Documentation

◆ Mnemonic

Enumerator
ADD 
ADDU 
ADDI 
ADDIU 
SUB 
SUBU 
SLT 
SLTU 
SLTI 
SLTIU 
DIV 
DIVU 
MULT 
MULTU 
AND 
ANDI 
OR 
ORI 
XOR 
XORI 
NOR 
SLL 
SRL 
SRA 
SLLV 
SRLV 
SRAV 
LB 
LBU 
LH 
LHU 
LUI 
LW 
LWL 
LWR 
SB 
SH 
SW 
SWL 
SWR 
BEQ 
BNE 
BGEZ 
BGTZ 
BLEZ 
BLTZ 
BGEZAL 
BLTZAL 
JAL 
JR 
JALR 
MFHI 
MTHI 
MFLO 
MTLO 
BREAK 
SYSCALL 
MFC0 
MTC0 
CFC0 
CTC0 
MFC2 
MTC2 
CFC2 
CTC2 
SWC2 
LWC2 
INVALID 

Constructor & Destructor Documentation

◆ Instruction()

Mips::Decoder::Instruction::Instruction ( uint32_t  opcode)
inline

Member Function Documentation

◆ cop()

uint32_t Mips::Decoder::Instruction::cop ( ) const
inline

◆ copFunc()

uint32_t Mips::Decoder::Instruction::copFunc ( ) const
inline

◆ funct()

uint32_t Mips::Decoder::Instruction::funct ( ) const
inline

◆ getBranchAddress()

uint32_t Mips::Decoder::Instruction::getBranchAddress ( uint32_t  pc) const
inline

◆ getJumpAddress()

uint32_t Mips::Decoder::Instruction::getJumpAddress ( uint32_t  pc) const
inline

◆ getJumpRegisterAddress()

uint32_t Mips::Decoder::Instruction::getJumpRegisterAddress ( GPRRegs gpr) const
inline

◆ getLoadAddress()

uint32_t Mips::Decoder::Instruction::getLoadAddress ( GPRRegs gpr) const
inline

◆ getLoadMask()

uint32_t Mips::Decoder::Instruction::getLoadMask ( GPRRegs gpr) const
inline

◆ getStoreAddress()

uint32_t Mips::Decoder::Instruction::getStoreAddress ( GPRRegs gpr) const
inline

◆ getStoreMask()

uint32_t Mips::Decoder::Instruction::getStoreMask ( GPRRegs gpr) const
inline

◆ getValueToStore()

uint32_t Mips::Decoder::Instruction::getValueToStore ( GPRRegs gpr,
uint32_t  cop2regs[32] 
) const
inline

◆ imm()

int32_t Mips::Decoder::Instruction::imm ( ) const
inline

◆ isLoad()

bool Mips::Decoder::Instruction::isLoad ( ) const
inline

◆ isStore()

bool Mips::Decoder::Instruction::isStore ( ) const
inline

◆ mnemonic()

Mnemonic Mips::Decoder::Instruction::mnemonic ( ) const
inline

◆ offset()

int32_t Mips::Decoder::Instruction::offset ( ) const
inline

◆ opcode()

uint32_t Mips::Decoder::Instruction::opcode ( ) const
inline

◆ rd()

uint32_t Mips::Decoder::Instruction::rd ( ) const
inline

◆ rs()

uint32_t Mips::Decoder::Instruction::rs ( ) const
inline

◆ rt()

uint32_t Mips::Decoder::Instruction::rt ( ) const
inline

◆ sa()

uint32_t Mips::Decoder::Instruction::sa ( ) const
inline

◆ target()

uint32_t Mips::Decoder::Instruction::target ( ) const
inline

Member Data Documentation

◆ code

uint32_t Mips::Decoder::Instruction::code

The documentation for this struct was generated from the following file: