Professional Documents
Culture Documents
To command a computer’s hardware, you must speak its language. The words
of a computer’s language are called instructions, and its vocabulary is called an
instruction set. Instruction set architecture serves as the interface between
hardware and software. It provides the mechanism by which the software tells the
hardware what should be done.
2
3
Instruction Set Architecture
4
Instruction Set
5
Instruction Set Architecture
6
7
Is the ISA different for different CPU
8
RISC vs. CISC
9
RISC vs. CISC
MULT 2:3, 5:2
CISC
vs.
RISC
LOAD A, 2:3
LOAD B, 5:2
PROD A, B
STORE 2:3, A 10
RISC vs. CISC
11
Instruction Length
12
Instruction Length
13
How many Operands?
14
How many Operands?
15
How many Operands?
16
How many Operands?
Intel 8080, 18
PDP-8
How many Operands?
PC
19
How many Operands?
Load R1, A
Store C, R1
PC
20
Comparing No. of Instructions
21
Typical Instructions
22
Typical Addressing Modes
23
Instruction Set
24
25
MIPS Instruction Formats
R
Type
I Type
J Type
26
Accessing the operands
27
Instruction Set
Register
Conventional Name Usage
Number
$0 $zero Hard-wired to 0
$1 $at Reserved for pseudo-instructions
$2 - $3 $v0, $v1 Return values from functions
Arguments to functions - not preserved by
$4 - $7 $a0 - $a3
subprograms
$8 - $15 $t0 - $t7 Temporary data, not preserved by subprograms
$16 - $23 $s0 - $s7 Saved registers, preserved by subprograms
More temporary registers, not preserved by
$24 - $25 $t8 - $t9
subprograms
$26 - $27 $k0 - $k1 Reserved for kernel. Do not use.
$28 $gp Global Area Pointer (base of global data segment)
$29 $sp Stack Pointer
$30 $fp Frame Pointer
$31 $ra Return Address
28
Memory Organization
29
Memory Organization
30
Which instructions
31
MIPS Addressing Modes
32
Addressing Modes
33
Addressing Modes
34
Addressing Modes
8 bit
32
N bit
32
32
32 bit
32 bit
35
Addressing Modes
36
Addressing Modes
32
32
32 bit
32 bit
37
Addressing Modes
38
Addressing Modes
32 32 2 pow 32/4
32 bit 32
39
MIPS Instructions
40
Operands