Professional Documents
Culture Documents
Core Instruction Set (Including Pseudo Instructions)
Core Instruction Set (Including Pseudo Instructions)
jr
jalr
R
R
Move
Load Byte
Load Byte Unsigned
Load Halfword
Load Halfword Unsigned
Load Upper Imm.
Load Word
Load Immediate
Load Address
Store Byte
Store Halfword
Store Word
move
lb
lbu
lh
lhu
lui
lw
li
la
sb
sh
sw
P
I
I
I
I
I
I
P
P
I
I
I
REGISTERS
Example instruction
Corresponding meaning
OPCODE/
FUNCT
(Hex)
0/20
8
9
0/21
0/22
0/23
0/24
c
0/27
0/25
d
0/26
e
0/00
0/02
0/03
0/04
0/06
0/07
0/2a
a
b
0/2b
4
5
2
2
0/08
0/09
FORMAT=P: PSEUDO-INSTRUCTION
20
24
25
25
f
23
28
29
2b
funct
0
0
0
funct
0
0
Divide
MNEMONIC
div
Divide Unsigned
divu
Multiply
Multiply Unsigned
Branch On FP True
Branch On FP False
FP Compare Single
FP Compare Double
mult
multu
bc1t
bc1f
c.x.s
c.x.d
R
R
FI
FR
FR
FR
FP Add Single
FP Divide Single
FP Multiply Single
FP Subtract Single
FP Add Double
FP Divide Double
FP Multiply Double
FP Subtract Double
Move From Hi
Move From Lo
Move From Control
Load FP Single
Load FP Double
add.s
div.s
mul.s
sub.s
add.d
div.d
mul.d
sub.d
mfhi
mflo
mfc0
lwc1
ldc1
FR
FR
FR
FR
FR
FR
FR
FR
R
R
R
I
I
Store FP Single
Store FP Double
swc1
sdc1
I
I
NAME
OPCODE/
FMT/FT/
FUNCT
0///1a
(6)
(6)
(4)
(4)
0///1b
0///18
0///19
11/8/1/
11/8/0/
11/10//y
11/11//y
(2)
(2)
11/10//0
11/10//3
11/10//2
11/10//1
11/11//0
11/11//3
11/11//2
11/11//1
0///10
0///12
16/0//0
31///
35///
(2)
(2)
39///
3d///
ASSEMBLER DIRECTIVES
.data [addr]
.kdata [addr]
.ktext [addr]
.text [addr]
EXCEPTION CODES
SYSCALLS
SERVICE
$v0
ARGS
print_int
1 integer $a0
print_float 2 float $f12
print_double 3 double $f12/$f13
print_string 4 string $a0
read_int
5
read_float
6
read_double 7
read_string 8 buf $a0, buflen $a1
sbrk
9 amount $a
exit
10
RESULT
Number
0
4
Name
Int
AdEL
5
6
7
8
9
10
11
12
13
15
AdES
IBE
DBE
Sys
Bp
RI
CpU
Ov
Tr
FPE
Cause of Exception
Interrupt (hardware)
Address Error Exception (load or instruction
fetch)
Address Error Exception (store)
Bus Error on Instruction Fetch
Bus Error on Load or Store
Syscall Exception
Breakpoint Exception
Reserved Instruction Exception
Coprocessor Unimplemented
Arithmetic Overflow Exception
Trap
Floating Point Exception
[1] Patterson, David A; Hennessy, John J.: Computer Organization and Design, 3rd Edition. Morgan Kaufmann Publishers. San Francisco, 2005.