Specification info
Description:
MIPS processor of the Nintendo 64. The R4300i is a 64-bit processor. It supports the MIPS III ISA introduction set.
CPU clock speed:
93.75 MHz
Address bus:
32-Bit
CPU caches:
Name | Size | Comment |
---|---|---|
L1 | 24 KB | Divided into 16 KB for instructions and 8 KB for data. |
Document version:
1.0.0
Sources:
Glossary
Glossary
Name | Description |
---|---|
rs | 5-bit source register specifier |
rt | 5-bit target (source/destination) register or branch condition |
rd | 5-bit destination register specifier |
sa | 5-bit shift amount |
fs | 5-bit floating point source register specifier |
ft | 5-bit floating point target (source/destination) register or branch condition |
fd | 5-bit floating point destination register specifier |
base | 5-bit value |
imm | 16 bit immediate value |
offset | 16 bit branch displacement or address displacement |
target | 26 bit jump target address |
Registers
Main-Processor
Name | Value | Size (Bits) |
---|---|---|
r0/reg0 | 0x00 | 64 |
at/reg1 | 0x01 | 64 |
v0/reg2 | 0x02 | 64 |
v1/reg3 | 0x03 | 64 |
a0/reg4 | 0x04 | 64 |
a1/reg5 | 0x05 | 64 |
a2/reg6 | 0x06 | 64 |
a3/reg7 | 0x07 | 64 |
t0/reg8 | 0x08 | 64 |
t1/reg9 | 0x09 | 64 |
t2/reg10 | 0x0A | 64 |
t3/reg11 | 0x0B | 64 |
t4/reg12 | 0x0C | 64 |
t5/reg13 | 0x0D | 64 |
t6/reg14 | 0x0E | 64 |
t7/reg15 | 0x0F | 64 |
s0/reg16 | 0x10 | 64 |
s1/reg17 | 0x11 | 64 |
s2/reg18 | 0x12 | 64 |
s3/reg19 | 0x13 | 64 |
s4/reg20 | 0x14 | 64 |
s5/reg21 | 0x15 | 64 |
s6/reg22 | 0x16 | 64 |
s7/reg23 | 0x17 | 64 |
t8/reg24 | 0x18 | 64 |
t9/reg25 | 0x19 | 64 |
k0/reg26 | 0x1A | 64 |
k1/reg27 | 0x1B | 64 |
gp/reg28 | 0x1C | 64 |
sp/reg29 | 0x1D | 64 |
s8/reg30 | 0x1E | 64 |
ra/reg31 | 0x1F | 64 |
COP0-Processor
Name | Value | Size (Bits) |
---|---|---|
Index | 0x00 | 64 |
Random | 0x01 | 64 |
EntryLo0 | 0x02 | 64 |
EntryLo1 | 0x03 | 64 |
Context | 0x04 | 64 |
PageMask | 0x05 | 64 |
Wired | 0x06 | 64 |
*RESERVED* | 0x07 | 64 |
BadVAddr | 0x08 | 64 |
Count | 0x09 | 64 |
EntryHi | 0x0A | 64 |
Compare | 0x0B | 64 |
Status | 0x0C | 64 |
Cause | 0x0D | 64 |
EPC | 0x0E | 64 |
PRevID | 0x0F | 64 |
Config | 0x10 | 64 |
LLAddr | 0x11 | 64 |
WatchLo | 0x12 | 64 |
WatchHi | 0x13 | 64 |
XContext | 0x14 | 64 |
*RESERVED* | 0x15 | 64 |
*RESERVED* | 0x16 | 64 |
*RESERVED* | 0x17 | 64 |
*RESERVED* | 0x18 | 64 |
*RESERVED* | 0x19 | 64 |
PErr | 0x1A | 64 |
CacheErr | 0x1B | 64 |
TagLo | 0x1C | 64 |
TagHi | 0x1D | 64 |
ErrorEPC | 0x1E | 64 |
*RESERVED* | 0x1F | 64 |
Load and Store Instructions
LB
Opcode:
32
Format:
LB rt, offset(base)
Purpose:
To load a byte from memory as a signed value.
Implementation:
rt = byte[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LBU
Opcode:
36
Format:
LBU rt, offset(base)
Purpose:
To load a byte from memory as an unsigned value.
Implementation:
rt = byte[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LD
Opcode:
55
Format:
LD rt, offset(base)
Purpose:
To load a doubleword from memory.
Implementation:
rt = doubleword[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LDL
Opcode:
26
Format:
LDL rt, offset(base)
Purpose:
To load the most-significant part of a doubleword from an unaligned memory address.
Implementation:
left(rt) = right[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LDR
Opcode:
27
Format:
LDR rt, offset(base)
Purpose:
To load the least-significant part of a doubleword from an unaligned memory address.
Implementation:
right(rt) = left[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LH
Opcode:
33
Format:
LH rt, offset(base)
Purpose:
To load a halfword from memory as a signed value.
Implementation:
rt = halfword[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LHU
Opcode:
37
Format:
LHU rt, offset(base)
Purpose:
To load a halfword from memory as an unsigned value.
Implementation:
rt = halfword[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LL
Opcode:
48
Format:
LL rt, offset(base)
Purpose:
To load a word from memory for an atomic read-modify-write.
Implementation:
Nothing or missing documentation
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LLD
Opcode:
52
Format:
LLD rt, offset(base)
Purpose:
To load a doubleword from memory for an atomic read-modify-write.
Implementation:
Nothing or missing documentation
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LW
Opcode:
35
Format:
LW rt, offset(base)
Purpose:
To load a word from memory as a signed value.
Implementation:
rt = word[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LWL
Opcode:
34
Format:
LWL rt, offset(base)
Purpose:
To load the most-significant part of a word as a signed value from an unaligned memory address.
Implementation:
left(rt) = right[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LWR
Opcode:
38
Format:
LWR rt, offset(base)
Purpose:
To load the least-significant part of a word from an unaligned memory address as a signed value.
Implementation:
right(rt) = left[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LWU
Opcode:
39
Format:
LWU rt, offset(base)
Purpose:
To load a word from memory as an unsigned value.
Implementation:
rt = word[base+offset]
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SB
Opcode:
40
Format:
SB rt, offset(base)
Purpose:
To store a byte to memory.
Implementation:
byte[base+offset] = rt
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SC
Opcode:
56
Format:
SC rt, offset(base)
Purpose:
To store a word to memory to complete an atomic read-modify-write.
Implementation:
Nothing or missing documentation
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SCD
Opcode:
60
Format:
SCD rt, offset(base)
Purpose:
To store a doubleword to memory to complete an atomic
Implementation:
Nothing or missing documentation
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SD
Opcode:
63
Format:
SD rt, offset(base)
Purpose:
To store a doubleword to memory.
Implementation:
doulbeword[base+offset] = rt
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SDL
Opcode:
44
Format:
SDL rt, offset(base)
Purpose:
To store the most-significant part of a doubleword to an unaligned memory address.
Implementation:
right[base+offset] = left(rt)
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SDR
Opcode:
45
Format:
SDR rt, offset(base)
Purpose:
To store the least-significant part of a doubleword to an unaligned memory address.
Implementation:
left[base+offset] = right(rt)
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SH
Opcode:
41
Format:
SH rt, offset(base)
Purpose:
To store a halfword to memory.
Implementation:
halfword[base+offset] = rt
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SW
Opcode:
43
Format:
SW rt, offset(base)
Purpose:
To store a word to memory.
Implementation:
word[base+offset] = rt
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SWL
Opcode:
42
Format:
SWL rt, offset(base)
Purpose:
To store the most-significant part of a word to an unaligned memory address.
Implementation:
right[base+offset] = left(rt)
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SWR
Opcode:
46
Format:
SWR rt, offset(base)
Purpose:
To store the least-significant part of a word to an unaligned memory address.
Implementation:
left[base+offset] = right(rt)
How to decode:
opcode | base | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SYNC
Opcode:
0
Format:
SYNC (stype = 0 implied)
Purpose:
To order loads and stores to shared memory in a
Implementation:
Nothing or missing documentation
How to decode:
opcode | 0000 0000 0000 000 | stype | 001111 (15) |
---|---|---|---|
6 | 15 | 5 | 6 |
Atithmetic Instructions
ADD
Opcode:
0
Format:
ADD rd, rs, rt
Purpose:
To add 32-bit integers. If overflow occurs, then trap. Comment: ADD rd, r0, rs is equal to a MOVE rd, rs
Implementation:
rd = rs + rt
How to decode:
opcode | rs | rt | rd | 00000 | 100000 (32) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
ADDI
Opcode:
8
Format:
ADDI rt, rs, immediate
Purpose:
To add a constant to a 32-bit integer. If overflow occurs, then trap.
Implementation:
rt = rs + immediate
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
ADDIU
Opcode:
9
Format:
ADDIU rt, rs, immediate
Purpose:
To add a constant to a 32-bit integer.
Implementation:
rt = rs + immediate
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
ADDU
Opcode:
0
Format:
ADDU rd, rs, rt
Purpose:
To add 32-bit integers.
Implementation:
rd = rs + rt
How to decode:
opcode | rs | rt | rd | 00000 | 100001 (33) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
AND
Opcode:
0
Format:
AND rd, rs, rt
Purpose:
To do a bitwise logical AND.
Implementation:
rd = (rs AND rt)
How to decode:
opcode | rs | rt | rd | 00000 | 100100 (36) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
ANDI
Opcode:
12
Format:
ANDI rt, rs, immediate
Purpose:
To do a bitwise logical AND with a constant.
Implementation:
rt = (rs AND immediate)
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
DADD
Opcode:
0
Format:
DADD rd, rs, rt
Purpose:
To add 64-bit integers. If overflow occurs, then trap.
Implementation:
rd = rs + rt
How to decode:
opcode | rs | rt | rd | 00000 | 101100 (44) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DADDI
Opcode:
24
Format:
DADDI rt, rs, immediate
Purpose:
To add a constant to a 64-bit integer. If overflow occurs, then trap.
Implementation:
rt = rs + immediate
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
DADDIU
Opcode:
25
Format:
DADDIU rt, rs, immediate
Purpose:
To add a constant to a 64-bit integer.
Implementation:
rt = rs + immediate
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
DADDU
Opcode:
0
Format:
DADDU rd, rs, rt
Purpose:
To add 64-bit integers.
Implementation:
rd = rs + rt
How to decode:
opcode | rs | rt | rd | 00000 | 101101 (45) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DDIV
Opcode:
0
Format:
DDIV rs, rt
Purpose:
To divide 64-bit signed integers.
Implementation:
LO = rs / rt; HI = rs MOD rt
How to decode:
opcode | rs | rt | 0000 0000 00 | 011110 (30) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
DDIVU
Opcode:
0
Format:
DDIVU rs, rt
Purpose:
To divide 64-bit unsigned integers.
Implementation:
LO = rs / rt; HI = rs MOD rt
How to decode:
opcode | rs | rt | 0000 0000 00 | 011111 (31) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
DIV
Opcode:
0
Format:
DIV rs, rt
Purpose:
To divide 32-bit signed integers.
Implementation:
LO = rs / rt; HI = rs MOD rt
How to decode:
opcode | rs | rt | 0000 0000 00 | 011010 (26) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
DIVU
Opcode:
0
Format:
DIVU rs, rt
Purpose:
To divide 32-bit unsigned integers.
Implementation:
LO = rs / rt; HI = rs MOD rt
How to decode:
opcode | rs | rt | 0000 0000 00 | 011011 (27) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
DMULT
Opcode:
0
Format:
DMULT rs, rt
Purpose:
To multiply 64-bit signed integers.
Implementation:
LO = low(rs*rt); HI = high(rs*rt)
How to decode:
opcode | rs | rt | 0000 0000 00 | 011100 (28) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
DMULTU
Opcode:
0
Format:
DMULTU rs, rt
Purpose:
To multiply 64-bit unsigned integers.
Implementation:
LO = low(rs*rt); HI = high(rs*rt)
How to decode:
opcode | rs | rt | 0000 0000 00 | 011101 (29) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
DSLL
Opcode:
0
Format:
DSLL rd, rt, sa
Purpose:
To left shift a doubleword by a fixed amount -- 0 to 31 bits.
Implementation:
rd = rt << sa
How to decode:
opcode | 00000 | rt | rd | sa | 111000 (56) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSLL32
Opcode:
0
Format:
DSLL32 rd, rt, sa
Purpose:
To left shift a doubleword by a fixed amount -- 32 to 63 bits.
Implementation:
rd = rt << (sa+32)
How to decode:
opcode | 00000 | rt | rd | sa | 111100 (60) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSLLV
Opcode:
0
Format:
DSLLV rd, rt, rs
Purpose:
To left shift a doubleword by a variable number of bits.
Implementation:
rd = rt << rs
How to decode:
opcode | rs | rt | rd | 00000 | 010100 (20) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSRA
Opcode:
0
Format:
DSRA rd, rt, sa
Purpose:
To arithmetic right shift a doubleword by a fixed amount -- 0 to 31 bits.
Implementation:
rd = rt >> sa
How to decode:
opcode | 00000 | rt | rd | sa | 111011 (59) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSRA32
Opcode:
0
Format:
DSRA32 rd, rt, sa
Purpose:
To arithmetic right shift a doubleword by a fixed amount -- 32-63 bits.
Implementation:
rd = rt >> (sa+32)
How to decode:
opcode | 00000 | rt | rd | sa | 111111 (63) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSRAV
Opcode:
0
Format:
DSRAV rd, rt, rs
Purpose:
To arithmetic right shift a doubleword by a variable number of bits.
Implementation:
rd = rt >> rs
How to decode:
opcode | 00000 | rt | rd | rs | 010111 (23) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSRL
Opcode:
0
Format:
DSRL rd, rt, sa
Purpose:
To logical right shift a doubleword by a fixed amount -- 0 to 31 bits.
Implementation:
rd = rt >> sa
How to decode:
opcode | 00000 | rt | rd | sa | 111010 (58) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSRL32
Opcode:
0
Format:
DSRL32 rd, rt, sa
Purpose:
To logical right shift a doubleword by a fixed amount -- 32 to 63 bits.
Implementation:
rd = rt >> (sa+32)
How to decode:
opcode | 00000 | rt | rd | sa | 111110 (62) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSRLV
Opcode:
0
Format:
DSRLV rd, rt, rs
Purpose:
To logical right shift a doubleword by a variable number of bits.
Implementation:
rd = rt >> rs
How to decode:
opcode | 00000 | rt | rd | rs | 010110 (22) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSUB
Opcode:
0
Format:
DSUB rd, rs, rt
Purpose:
To subtract 64-bit integers; trap if overflow.
Implementation:
rd = rs - rt
How to decode:
opcode | rs | rt | rd | 00000 | 101110 (46) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DSUBU
Opcode:
0
Format:
DSUBU rd, rs, rt
Purpose:
To subtract 64-bit integers.
Implementation:
rd = rs - rt
How to decode:
opcode | rs | rt | rd | 00000 | 101111 (47) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
LUI
Opcode:
15
Format:
LUI rt, immediate
Purpose:
To load a constant into the upper half of a word.
Implementation:
rt = immediate * 10000h
How to decode:
opcode | 00000 | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
MFHI
Opcode:
0
Format:
MFHI rd
Purpose:
To copy the special purpose HI register to a GPR.
Implementation:
rd = HI
How to decode:
opcode | 0000 0000 00 | rd | 00000 | 010000 (16) |
---|---|---|---|---|
6 | 10 | 5 | 5 | 6 |
MFLO
Opcode:
0
Format:
MFLO rd
Purpose:
To copy the special purpose LO register to a GPR.
Implementation:
rd = LO
How to decode:
opcode | 0000 0000 00 | rd | 00000 | 010010 (18) |
---|---|---|---|---|
6 | 10 | 5 | 5 | 6 |
MTHI
Opcode:
0
Format:
MTHI rs
Purpose:
To copy a GPR to the special purpose HI register.
Implementation:
Nothing or missing documentation
How to decode:
opcode | rs | 0000 0000 0000 000 | 010001 (17) |
---|---|---|---|
6 | 5 | 15 | 6 |
MTLO
Opcode:
0
Format:
MTLO rs
Purpose:
To copy a GPR to the special purpose LO register.
Implementation:
Nothing or missing documentation
How to decode:
opcode | rs | 0000 0000 0000 000 | 010011 (19) |
---|---|---|---|
6 | 5 | 15 | 6 |
MULT
Opcode:
0
Format:
MULT rs, rt
Purpose:
To multiply 32-bit signed integers.
Implementation:
LO = low(rs*rt); HI = high(rs*rt)
How to decode:
opcode | rs | rt | 0000 0000 00 | 011000 (24) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
MULTU
Opcode:
0
Format:
MULTU rs, rt
Purpose:
To multiply 32-bit unsigned integers.
Implementation:
LO = low(rs*rt); HI = high(rs*rt)
How to decode:
opcode | rs | rt | 0000 0000 00 | 011001 (25) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
NOR
Opcode:
0
Format:
NOR rd, rs, rt
Purpose:
To do a bitwise logical NOT OR.
Implementation:
rd = (rs NOR rt)
How to decode:
opcode | rs | rt | rd | 00000 | 100111 (39) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
OR
Opcode:
0
Format:
OR rd, rs, rt
Purpose:
To do a bitwise logical OR.
Implementation:
rd = (rs OR rt)
How to decode:
opcode | rs | rt | rd | 00000 | 100101 (37) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
ORI
Opcode:
13
Format:
ORI rt, rs, immediate
Purpose:
To do a bitwise logical OR with a constant. Comment: ORI rt, r0, imm is equal to a LI rt, imm
Implementation:
rt = (rs OR immediate)
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
SLL
Opcode:
0
Format:
SLL rd, rt, sa
Purpose:
To left shift a word by a fixed number of bits. Comment: SLL r0, r0, 0 is equal to a NOP (No OPeration)
Implementation:
rd = rt << sa
How to decode:
opcode | 00000 | rt | rd | sa | 000000 (0) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SLLV
Opcode:
0
Format:
SLLV rd, rt, rs
Purpose:
To left shift a word by a variable number of bits.
Implementation:
rd = rt << sa
How to decode:
opcode | rs | rt | rd | 00000 | 000100 (4) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SLT
Opcode:
0
Format:
SLT rd, rs, rt
Purpose:
To record the result of a less-than comparison.
Implementation:
if rs < rt then rd = 1 else rd = 0
How to decode:
opcode | rs | rt | rd | 00000 | 101010 (42) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SLTI
Opcode:
10
Format:
SLTI rt, rs, immediate
Purpose:
To record the result of a less-than comparison with a constant.
Implementation:
if rs < immediate then rd = 1 else rd = 0
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
SLTIU
Opcode:
11
Format:
SLTIU rt, rs, immediate
Purpose:
To record the result of an unsigned less-than comparison with a constant.
Implementation:
if rs < immediate then rd = 1 else rd = 0
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
SLTU
Opcode:
0
Format:
SLTU rd, rs, rt
Purpose:
To record the result of an unsigned less-than comparison.
Implementation:
if rs < rt then rd = 1 else rd = 0
How to decode:
opcode | rs | rt | rd | 00000 | 101011 (43) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SRA
Opcode:
0
Format:
SRA rd, rt, sa
Purpose:
To arithmetic right shift a word by a fixed number of bits.
Implementation:
rd = rt >> sa
How to decode:
opcode | 00000 | rt | rd | sa | 000011 (3) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SRAV
Opcode:
0
Format:
SRAV rd, rt, rs
Purpose:
To arithmetic right shift a word by a variable number of bits.
Implementation:
rd = rt >> rs
How to decode:
opcode | rs | rt | rd | 00000 | 000111 (7) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SRL
Opcode:
0
Format:
SRL rd, rt, sa
Purpose:
To logical right shift a word by a fixed number of bits.
Implementation:
rd = rt >> sa
How to decode:
opcode | 00000 | rt | rd | sa | 000010 (2) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SRLV
Opcode:
0
Format:
SRLV rd, rt, rs
Purpose:
To logical right shift a word by a variable number of bits.
Implementation:
rd = rt >> rs
How to decode:
opcode | rs | rt | rd | 00000 | 000110 (6) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SUB
Opcode:
0
Format:
SUB rd, rs, rt
Purpose:
To subtract 32-bit integers. If overflow occurs, then trap. Comment: SUB rd, r0, rt is equal to a NEG rd, rt
Implementation:
rd = rs - rt
How to decode:
opcode | rs | rt | rd | 00000 | 100010 (34) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SUBU
Opcode:
0
Format:
SUBU rd, rs, rt
Purpose:
To subtract 32-bit integers. No trap on overflow. Comment: SUBU rd, r0, rs is equal to a NEGU rd, rs
Implementation:
rd = rs - rt
How to decode:
opcode | rs | rt | rd | 00000 | 100011 (35) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
XOR
Opcode:
0
Format:
XOR rd, rs, rt
Purpose:
To do a bitwise logical EXCLUSIVE OR.
Implementation:
rd = (rs XOR rt)
How to decode:
opcode | rs | rt | rd | 00000 | 100110 (38) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
XORI
Opcode:
14
Format:
XORI rt, rs, immediate
Purpose:
To do a bitwise logical EXCLUSIVE OR with a constant.
Implementation:
rd = (rs XOR immediate)
How to decode:
opcode | rs | rt | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
Jump and Branch Instructions
BEQ
Opcode:
4
Format:
BEQ rs, rt, offset
Purpose:
To compare GPRs then do a PC-relative conditional branch. Comment: BEQ rs, r0, offset is equal to a BEQZ rs, offset BEQ r0, r0, offset is equal to a B offset
Implementation:
branch if rs = rt
How to decode:
opcode | rs | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BEQL
Opcode:
20
Format:
BEQL rs, rt, offset
Purpose:
To compare GPRs then do a PC-relative conditional branch; execute the delay slot only if the branch is taken. Comment: BEQL rs, r0, offset is equal to a BEQZL rs, offset
Implementation:
branch if rs = rt
How to decode:
opcode | rs | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BGEZ
Opcode:
1
Format:
BGEZ rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch.
Implementation:
branch if rs >= 0 (signed)
How to decode:
opcode | rs | 00001 (1) | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BGEZAL
Opcode:
1
Format:
BGEZAL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional procedure call. Comment: BGEZAL r0, offset is equal to a BAL offset
Implementation:
branch if rs >= 0 (signed) (return address in ra)
How to decode:
opcode | rs | 10001(17) | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BGEZALL
Opcode:
1
Format:
BGEZALL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional procedure call; execute the delay slot only if the branch is taken.
Implementation:
branch if rs >= 0 (signed) (return address in ra)
How to decode:
opcode | rs | 10011(19) | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BGEZL
Opcode:
1
Format:
BGEZL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch; execute the delay slot only if the branch is taken.
Implementation:
branch if rs >= 0 (signed)
How to decode:
opcode | rs | 00011 (3) | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BGTZ
Opcode:
7
Format:
BGTZ rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch.
Implementation:
branch if rs > 0 (signed)
How to decode:
opcode | rs | 00000 | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BGTZL
Opcode:
23
Format:
BGTZL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch; execute the delay slot only if the branch is taken.
Implementation:
branch if rs > 0 (signed)
How to decode:
opcode | rs | 00000 | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BLEZ
Opcode:
6
Format:
BLEZ rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch.
Implementation:
branch if rs <= 0 (signed)
How to decode:
opcode | rs | 00000 | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BLEZL
Opcode:
22
Format:
BLEZL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch; execute the delay slot only if the branch is taken.
Implementation:
branch if rs <= 0 (signed)
How to decode:
opcode | rs | 00000 | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BLTZ
Opcode:
1
Format:
BLTZ rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch.
Implementation:
branch if rs < 0 (signed)
How to decode:
opcode | rs | 00000 | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BLTZAL
Opcode:
1
Format:
BLTZAL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional procedure call.
Implementation:
branch if rs < 0 (signed) (return address in ra)
How to decode:
opcode | rs | 10000 | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BLTZALL
Opcode:
1
Format:
BLTZALL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional procedure call; execute the delay slot only if the branch is taken.
Implementation:
branch if rs < 0 (signed) (return address in ra)
How to decode:
opcode | rs | 10010 | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BLTZL
Opcode:
1
Format:
BLTZL rs, offset
Purpose:
To test a GPR then do a PC-relative conditional branch; execute the delay slot only if the branch is taken.
Implementation:
branch if rs < 0 (signed)
How to decode:
opcode | rs | 00010 (2) | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BNE
Opcode:
5
Format:
BNE rs, rt, offset
Purpose:
To compare GPRs then do a PC-relative conditional branch. Comment: BNE rs, r0, offset is equal to a BNEZ rs, offset
Implementation:
branch if rs <> rt
How to decode:
opcode | rs | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
BNEL
Opcode:
21
Format:
BNEL rs, rt, offset
Purpose:
To compare GPRs then do a PC-relative conditional branch; execute the delay slot only if the branch is taken. Comment: BNEL rs, r0, offset is equal to a BNEZL rs, offset
Implementation:
branch if rs <> rt
How to decode:
opcode | rs | rt | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
J
Opcode:
2
Format:
J target
Purpose:
To branch within the current 256 MB aligned region.
Implementation:
Nothing or missing documentation
How to decode:
opcode | instr_index |
---|---|
6 | 26 |
JAL
Opcode:
3
Format:
JAL target
Purpose:
To procedure call within the current 256 MB aligned region.
Implementation:
return address in ra
How to decode:
opcode | instr_index |
---|---|
6 | 26 |
JALR
Opcode:
0
Format:
JALR rs, rd
Purpose:
To procedure call to an instruction address in a register.
Implementation:
return address in rd
How to decode:
opcode | rs | 00000 | rd | 001001 (9) |
---|---|---|---|---|
6 | 5 | 5 | 5 | 6 |
JR
Opcode:
0
Format:
JR rs
Purpose:
To branch to an instruction address in a register.
Implementation:
PC = rs
How to decode:
opcode | rs | 0000 0000 0000 000 | 001000 (8) |
---|---|---|---|
6 | 5 | 15 | 6 |
Special instructions
BREAK
Opcode:
0
Format:
BREAK offset
Purpose:
To cause a Breakpoint exception.
Implementation:
Nothing or missing documentation
How to decode:
opcode | code | 001101 (13) |
---|---|---|
6 | 20 | 6 |
SYSCALL
Opcode:
0
Format:
SYSCALL offset
Purpose:
To cause a System Call exception.
Implementation:
Nothing or missing documentation
How to decode:
opcode | code | 001100 (12) |
---|---|---|
6 | 20 | 6 |
Exception Instructions
TEQ
Opcode:
0
Format:
TEQ rs, rt
Purpose:
To compare GPRs and do a conditional Trap.
Implementation:
if rs = rt then trap
How to decode:
opcode | rs | rt | code | 110100 (52) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
TEQI
Opcode:
1
Format:
TEQI rs, immediate
Purpose:
To compare a GPR to a constant and do a conditional Trap.
Implementation:
if rs = immediate then trap
How to decode:
opcode | rs | 01100(12) | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
TGE
Opcode:
0
Format:
TGE rs, rt
Purpose:
To compare GPRs and do a conditional Trap.
Implementation:
if rs >= rt then trap
How to decode:
opcode | rs | rt | code | 110000 (48) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
TGEI
Opcode:
1
Format:
TGEI rs, immediate
Purpose:
To compare a GPR to a constant and do a conditional Trap.
Implementation:
if rs >= immediate then trap
How to decode:
opcode | rs | 01000 (8) | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
TGEIU
Opcode:
1
Format:
TGEIU rs, immediate
Purpose:
To compare a GPR to a constant and do a conditional Trap.
Implementation:
if rs >= immediate then trap
How to decode:
opcode | rs | 01001 (9) | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
TGEU
Opcode:
0
Format:
TGEU rs, rt
Purpose:
To compare GPRs and do a conditional Trap.
Implementation:
if rs >= rt then trap
How to decode:
opcode | rs | rt | code | 110001 (49) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
TLT
Opcode:
0
Format:
TLT rs, rt
Purpose:
To compare GPRs and do a conditional Trap.
Implementation:
if rs < rt then trap
How to decode:
opcode | rs | rt | code | 110010 (50) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
TLTI
Opcode:
1
Format:
TLTI rs, immediate
Purpose:
To compare a GPR to a constant and do a conditional Trap.
Implementation:
if rs < immediate then trap (signed)
How to decode:
opcode | rs | 01010(10) | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
TLTIU
Opcode:
1
Format:
TLTIU rs, immediate
Purpose:
To compare a GPR to a constant and do a conditional Trap.
Implementation:
if rs < immediate then trap
How to decode:
opcode | rs | 01011(11) | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
TLTU
Opcode:
0
Format:
TLTU rs, rt
Purpose:
To compare GPRs and do a conditional Trap.
Implementation:
if rs < rt then trap
How to decode:
opcode | rs | rt | code | 110011 (51) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
TNE
Opcode:
0
Format:
TNE rs, rt
Purpose:
To compare GPRs and do a conditional Trap.
Implementation:
if rs <> rt then trap
How to decode:
opcode | rs | rt | code | 110110 (54) |
---|---|---|---|---|
6 | 5 | 5 | 10 | 6 |
TNEI
Opcode:
1
Format:
TNEI rs, immediate
Purpose:
To compare a GPR to a constant and do a conditional Trap.
Implementation:
if rs <> immediate then trap
How to decode:
opcode | rs | 01110(14) | immediate |
---|---|---|---|
6 | 5 | 5 | 16 |
System Control Processor (COP0) Instructions
CACHE
Opcode:
47
Format:
CACHE op, offset(base)
Purpose:
The 16-bit offset is sign-extended and added to the contents of general register base to form a virtual address. The virtual address is translated to a physical address using the TLB, and the 5-bit sub-opcode specifies a cache operation for that address.
Implementation:
Nothing or missing documentation
How to decode:
opcode | base | op | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
ERET
Opcode:
10000
Format:
ERET
Purpose:
ERET is the R4300 instruction for returning from an interrupt,
Implementation:
Nothing or missing documentation
How to decode:
opcode | CO | 0000 0000 0000 0000 000 | 011000 (24) |
---|---|---|---|
6 | 1 | 19 | 6 |
MFC0
Opcode:
10000
Format:
MFC0 rt, rd
Purpose:
To copy a word from an FPR to a GPR.
Implementation:
rt = COP rd
How to decode:
opcode | 00000 (0) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
MTC0
Opcode:
10000
Format:
MTC0 rt, rd
Purpose:
To copy a word from a GPR to an FPR.
Implementation:
COP rd = rt
How to decode:
opcode | 00100 (4) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
TLBP
Opcode:
10000
Format:
TLBP
Purpose:
The Index register is loaded with the address of the TLB entry
Implementation:
Nothing or missing documentation
How to decode:
opcode | CO | 0000 0000 0000 0000 000 | 001000 (8) |
---|---|---|---|
6 | 1 | 19 | 6 |
TLBR
Opcode:
10000
Format:
TLBR
Purpose:
The G bit (which controls ASID matching) read from the TLB is
Implementation:
Nothing or missing documentation
How to decode:
opcode | CO | 0000 0000 0000 0000 000 | 000001 (1) |
---|---|---|---|
6 | 1 | 19 | 6 |
TLBWI
Opcode:
10000
Format:
TLBWI
Purpose:
The G bit of the TLB is written with the logical AND of the G bits
Implementation:
Nothing or missing documentation
How to decode:
opcode | CO | 0000 0000 0000 0000 000 | 000010 (2) |
---|---|---|---|
6 | 1 | 19 | 6 |
TLBWR
Opcode:
10000
Format:
TLBWR
Purpose:
The G bit of the TLB is written with the logical AND of the G bits
Implementation:
Nothing or missing documentation
How to decode:
opcode | CO | 0000 0000 0000 0000 000 | 000110 (6) |
---|---|---|---|
6 | 1 | 19 | 6 |
Floating-point Unit, FPU (COP1) instructions
ABS.fmt
Opcode:
10001
Format:
ABS.S fd, fs ABS.D fd, fs
Purpose:
To compute the absolute value of an FP value.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 000101 (5) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
ADD.fmt
Opcode:
10001
Format:
ADD.S fd, fs, ft ADD.D fd, fs, ft
Purpose:
To add FP values.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | ft | fs | fd | 000000 (0) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
BC1F
Opcode:
10001
Format:
BC1F offset
Purpose:
To test an FP condition code and do a PC-relative conditional branch.
Implementation:
Nothing or missing documentation
How to decode:
opcode | 01000 (8) | 000 | nd (0) | tf (0) | offset |
---|---|---|---|---|---|
6 | 5 | 3 | 1 | 1 | 16 |
BC1FL
Opcode:
10001
Format:
BC1FL offset
Purpose:
To test an FP condition code and do a PC-relative conditional branch; execute the delay slot only if the branch is taken
Implementation:
Nothing or missing documentation
How to decode:
opcode | 01000 (8) | 000 | nd (1) | tf (0) | offset |
---|---|---|---|---|---|
6 | 5 | 3 | 1 | 1 | 16 |
BC1T
Opcode:
10001
Format:
BC1T offset
Purpose:
To test an FP condition code and do a PC-relative conditional branch.
Implementation:
Nothing or missing documentation
How to decode:
opcode | 01000 (8) | 000 | nd (0) | tf (1) | offset |
---|---|---|---|---|---|
6 | 5 | 3 | 1 | 1 | 16 |
BC1TL
Opcode:
10001
Format:
BC1TL offset
Purpose:
To test an FP condition code and do a PC-relative conditional branch; execute the delay slot only if the branch is taken.
Implementation:
Nothing or missing documentation
How to decode:
opcode | 01000 (8) | 000 | nd (1) | tf (1) | offset |
---|---|---|---|---|---|
6 | 5 | 3 | 1 | 1 | 16 |
C.cond.fmt
Opcode:
10001
Format:
C.cond.S fs, ft C.cond.D fs, ft
Purpose:
To compare FP values and record the Boolean result in
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | ft | fs | 000 | 00 | 11 | cond |
---|---|---|---|---|---|---|---|
6 | 5 | 5 | 5 | 3 | 2 | 2 | 4 |
CEIL.L.fmt
Opcode:
10001
Format:
CEIL.L.S fd, fs CEIL.L.D fd, fs
Purpose:
To convert an FP value to 64-bit fixed-point, rounding up.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001010 (10) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
CEIL.W.fmt
Opcode:
10001
Format:
CEIL.W.S fd, fs CEIL.W.D fd, fs
Purpose:
To convert an FP value to 32-bit fixed-point, rounding up.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001110 (14) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
CFC1
Opcode:
10001
Format:
CFC1 rt, fs
Purpose:
To copy a word from an FPU control register to a GPR.
Implementation:
rt = fs
How to decode:
opcode | 00010 (2) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
CTC1
Opcode:
10001
Format:
CTC1 rt, fs
Purpose:
To copy a word from a GPR to an FPU control register.
Implementation:
fs = rt
How to decode:
opcode | 00110 (6) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
CVT.D.fmt
Opcode:
10001
Format:
CVT.D.S fd, fs CVT.D.W fd, fs CVT.D.L fd, fs
Purpose:
To convert an FP or fixed-point value to double FP.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 100001 (33) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
CVT.L.fmt
Opcode:
10001
Format:
CVT.L.S fd, fs CVT.L.D fd, fs
Purpose:
To convert an FP value to a 64-bit fixed-point.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 100101 (37) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
CVT.S.fmt
Opcode:
10001
Format:
CVT.S.D fd, fs CVT.S.W fd, fs CVT.S.L fd, fs
Purpose:
To convert an FP or fixed-point value to single FP.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 100000 (32) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
CVT.W.fmt
Opcode:
10001
Format:
CVT.W.S fd, fs CVT.W.D fd, fs
Purpose:
To convert an FP value to 32-bit fixed-point.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 100100 (36) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DIV.fmt
Opcode:
10001
Format:
DIV.S fd, fs, ft DIV.D fd, fs, ft
Purpose:
To divide FP values.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | ft | fs | fd | 000011 (3) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
DMFC1
Opcode:
10001
Format:
DMFC1 rt, fs
Purpose:
To copy a doubleword from an FPR to a GPR.
Implementation:
Nothing or missing documentation
How to decode:
opcode | 00001 (1) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
DMTC1
Opcode:
10001
Format:
DMTC1 rt, fs
Purpose:
To copy a doubleword from a GPR to an FPR.
Implementation:
Nothing or missing documentation
How to decode:
opcode | 00101 (5) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
FLOOR.L.fmt
Opcode:
10001
Format:
FLOOR.L.S fd, fs FLOOR.L.D fd, fs
Purpose:
To convert an FP value to 64-bit fixed-point, rounding down.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001011 (11) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
FLOOR.W.fmt
Opcode:
10001
Format:
FLOOR.W.S fd, fs FLOOR.W.D fd, fs
Purpose:
To convert an FP value to 32-bit fixed-point, rounding down.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001111 (15) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
LDC1
Opcode:
53
Format:
LDC1 ft, offset(base)
Purpose:
To load a doubleword from memory to an FPR.
Implementation:
COP ft = doubleword[base+offset]
How to decode:
opcode | base | ft | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
LWC1
Opcode:
49
Format:
LWC1 ft, offset(base)
Purpose:
To load a word from memory to an FPR. Comment: LWC1 ft, offset(base) is equal to a L.S ft, offset(base)
Implementation:
COP ft = word[base+offset]
How to decode:
opcode | base | ft | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
MFC1
Opcode:
10001
Format:
MFC1 rt, fs
Purpose:
To copy a word from an FPU (CP1) general register to a GPR.
Implementation:
rt = COP fs
How to decode:
opcode | 00000 (0) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
MOV.fmt
Opcode:
10001
Format:
MOV.S fd, fs MOV.D fd, fs
Purpose:
To move an FP value between FPRs.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 000110 (6) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
MTC1
Opcode:
10001
Format:
MTC1 rt, fs
Purpose:
To copy a word from a GPR to an FPU (CP1) general register.
Implementation:
COP fs = rt
How to decode:
opcode | 00100 (4) | rt | fs | 0000 0000 000 |
---|---|---|---|---|
6 | 5 | 5 | 5 | 11 |
MUL.fmt
Opcode:
10001
Format:
MUL.S fd, fs, ft MUL.D fd, fs, ft
Purpose:
To multiply FP values.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | ft | fs | fd | 000010 (2) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
NEG.fmt
Opcode:
10001
Format:
NEG.S fd, fs NEG.D fd, fs
Purpose:
To negate an FP value.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 000111 (7) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
ROUND.L.fmt
Opcode:
10001
Format:
ROUND.L.S fd, fs ROUND.L.D fd, fs
Purpose:
To convert an FP value to 64-bit fixed-point, rounding to nearest.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001000 (8) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
ROUND.W.fmt
Opcode:
10001
Format:
ROUND.W.S fd, fs ROUND.W.D fd, fs
Purpose:
To convert an FP value to 32-bit fixed-point, rounding to nearest.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001100 (12) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SDC1
Opcode:
61
Format:
SDC1 ft, offset(base)
Purpose:
To store a doubleword from an FPR to memory.
Implementation:
doubleword[base+offset] = COP rt
How to decode:
opcode | base | ft | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
SQRT.fmt
Opcode:
10001
Format:
SQRT.S fd, fs SQRT.D fd, fs
Purpose:
To compute the square root of an FP value.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 000100 (4) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SUB.fmt
Opcode:
10001
Format:
SUB.S fd, fs, ft SUB.D fd, fs, ft
Purpose:
To subtract FP values.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | ft | fs | fd | 000001 (1) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
SWC1
Opcode:
57
Format:
SWC1 ft, offset(base)
Purpose:
To store a word from an FPR to memory. Comment: SWC1 ft, offset(base) is equal to a S.S ft, offset(base)
Implementation:
word[base+offset] = COP rt
How to decode:
opcode | base | ft | offset |
---|---|---|---|
6 | 5 | 5 | 16 |
TRUNC.L.fmt
Opcode:
10001
Format:
TRUNC.L.S fd, fs TRUNC.L.D fd, fs
Purpose:
To convert an FP value to 64-bit fixed-point, rounding toward zero.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001001 (9) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |
TRUNC.W.fmt
Opcode:
10001
Format:
TRUNC.W.S fd, fs TRUNC.W.D fd, fs
Purpose:
To convert an FP value to 32-bit fixed-point, rounding toward zero.
Implementation:
Nothing or missing documentation
How to decode:
opcode | fmt | 00000 | fs | fd | 001101 (13) |
---|---|---|---|---|---|
6 | 5 | 5 | 5 | 5 | 6 |