43 ADD,
ADDU,
ADDI,
ADDIU,
SUB,
SUBU,
SLT,
SLTU,
SLTI,
SLTIU,
DIV,
DIVU,
MULT,
MULTU,
70 MFC0,
MTC0,
CFC0,
CTC0,
MFC2,
MTC2,
CFC2,
CTC2,
SWC2,
LWC2,
83 int32_t
imm()
const {
return static_cast<int16_t
>(
code & 0xffff); }
282 return gpr.
r[
rs()] +
imm();
296 return gpr.
r[
rs()] +
imm();
312 switch (address & 0x3) {
326 switch (address & 0x3) {
346 return gpr.
r[
rt()] & 0xff;
348 return gpr.
r[
rt()] & 0xffff;
351 switch (address & 0x3) {
353 return gpr.
r[
rt()] << 24;
355 return gpr.
r[
rt()] << 16;
357 return gpr.
r[
rt()] << 8;
365 switch (address & 0x3) {
369 return gpr.
r[
rt()] >> 8;
371 return gpr.
r[
rt()] >> 16;
373 return gpr.
r[
rt()] >> 24;
378 return cop2regs[
rt()];
392 switch (address & 0x3) {
406 switch (address & 0x3) {
433 return pc + (
imm() << 2) + 4;
443 return (pc & 0xf0000000) | (
target() << 2);
uint32_t code
Definition decoder.hh:459
int32_t imm() const
Definition decoder.hh:83
uint32_t sa() const
Definition decoder.hh:82
uint32_t rd() const
Definition decoder.hh:81
uint32_t getJumpRegisterAddress(GPRRegs &gpr) const
Definition decoder.hh:449
uint32_t rs() const
Definition decoder.hh:79
uint32_t getJumpAddress(uint32_t pc) const
Definition decoder.hh:439
bool isStore() const
Definition decoder.hh:258
Mnemonic mnemonic() const
Definition decoder.hh:89
uint32_t getLoadMask(GPRRegs &gpr) const
Definition decoder.hh:302
uint32_t target() const
Definition decoder.hh:84
uint32_t getLoadAddress(GPRRegs &gpr) const
Definition decoder.hh:272
uint32_t getStoreAddress(GPRRegs &gpr) const
Definition decoder.hh:288
uint32_t getValueToStore(GPRRegs &gpr, uint32_t cop2regs[32]) const
Definition decoder.hh:343
bool isLoad() const
Definition decoder.hh:241
uint32_t cop() const
Definition decoder.hh:86
uint32_t opcode() const
Definition decoder.hh:77
int32_t offset() const
Definition decoder.hh:85
Mnemonic
Definition decoder.hh:41
@ NOR
Definition decoder.hh:46
@ BGTZ
Definition decoder.hh:58
@ SLTU
Definition decoder.hh:43
@ INVALID
Definition decoder.hh:73
@ SWR
Definition decoder.hh:55
@ MFC2
Definition decoder.hh:70
@ LB
Definition decoder.hh:52
@ CFC0
Definition decoder.hh:70
@ MTHI
Definition decoder.hh:64
@ SH
Definition decoder.hh:55
@ ORI
Definition decoder.hh:46
@ BLTZAL
Definition decoder.hh:58
@ BGEZAL
Definition decoder.hh:58
@ SLLV
Definition decoder.hh:49
@ JR
Definition decoder.hh:61
@ LW
Definition decoder.hh:52
@ ANDI
Definition decoder.hh:46
@ CTC0
Definition decoder.hh:70
@ SLT
Definition decoder.hh:43
@ SW
Definition decoder.hh:55
@ ADDU
Definition decoder.hh:43
@ CTC2
Definition decoder.hh:70
@ SYSCALL
Definition decoder.hh:67
@ SUB
Definition decoder.hh:43
@ BLEZ
Definition decoder.hh:58
@ MFLO
Definition decoder.hh:64
@ AND
Definition decoder.hh:46
@ SLL
Definition decoder.hh:49
@ MTC0
Definition decoder.hh:70
@ BLTZ
Definition decoder.hh:58
@ MTLO
Definition decoder.hh:64
@ MTC2
Definition decoder.hh:70
@ LUI
Definition decoder.hh:52
@ XORI
Definition decoder.hh:46
@ DIVU
Definition decoder.hh:43
@ SRL
Definition decoder.hh:49
@ LH
Definition decoder.hh:52
@ SUBU
Definition decoder.hh:43
@ MFHI
Definition decoder.hh:64
@ J
Definition decoder.hh:61
@ ADDIU
Definition decoder.hh:43
@ SLTI
Definition decoder.hh:43
@ DIV
Definition decoder.hh:43
@ SRAV
Definition decoder.hh:49
@ JAL
Definition decoder.hh:61
@ LWR
Definition decoder.hh:52
@ SLTIU
Definition decoder.hh:43
@ CFC2
Definition decoder.hh:70
@ JALR
Definition decoder.hh:61
@ MULTU
Definition decoder.hh:43
@ SWC2
Definition decoder.hh:70
@ LBU
Definition decoder.hh:52
@ MFC0
Definition decoder.hh:70
@ BGEZ
Definition decoder.hh:58
@ BREAK
Definition decoder.hh:67
@ ADD
Definition decoder.hh:43
@ SWL
Definition decoder.hh:55
@ SB
Definition decoder.hh:55
@ LWL
Definition decoder.hh:52
@ SRA
Definition decoder.hh:49
@ SRLV
Definition decoder.hh:49
@ XOR
Definition decoder.hh:46
@ ADDI
Definition decoder.hh:43
@ LWC2
Definition decoder.hh:70
@ BEQ
Definition decoder.hh:58
@ MULT
Definition decoder.hh:43
@ BNE
Definition decoder.hh:58
@ LHU
Definition decoder.hh:52
@ OR
Definition decoder.hh:46
uint32_t getStoreMask(GPRRegs &gpr) const
Definition decoder.hh:384
Instruction(uint32_t opcode)
Definition decoder.hh:37
uint32_t funct() const
Definition decoder.hh:78
uint32_t rt() const
Definition decoder.hh:80
uint32_t copFunc() const
Definition decoder.hh:87
uint32_t getBranchAddress(uint32_t pc) const
Definition decoder.hh:423
void uint32_t(classId, spec)
uint32_t r[34]
Definition mips.hh:50