计算机体系结构第二章.pdf
Computer Architecture
Chapter 2
Instruction Set
Wangbing
1
Chapter 2 Instruction Set
2.1 Classifying Instruction Set Architecture
2.2 Interpreting Memory Addresses
2.3 Addressing Modes
2.4 Optimizing Instruction Formats
2.5 Operation in the Instruction Set
2.6 RISC vs. CISC
2.7 The DLX Architecture
2
2.1 Classifying Instruction Set
Architecture
The type of internal storage in the CPU is the most
basic differentiation.(stack,accumulator,registers)
stack architecture
The operands are implicitly on the top of the stack
accumulator architecture
one operand is implicitly the accumulator
general-purpose register(GPR) architecture
The operands is explicitly either registers or
memory locations
3
There are really two classes of register computers.
register-memory architecture :one class can access
memory as part of any instruction
load-store or register-register architecture: one class
can access memory only with load and store
instructions
memory-memory architecture: keeps all operands in
memory, not found in machines shipping today
Stack Accumulator Register Register
(register-memory) (load-store)
Push A Load A Load R1,A Load R1,A
Push B Add B Add R1,B Load R2,B
Add Store C Store C,R1 Add R3,R1,R2
Pop C Store C,R3
Figure 2.1 The code sequence for C=A+B for four instruction sets