|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other instruction
formats: non-MIPS |
|
|
|
|
Other possible formats |
|
|
older formats were
designed to minimize the number of bits in an instruction |
|
|
3-register format (MIPS) |
|
|
|
|
|
addu $r10,$r8,$r9 |
|
|
|
|
2-register format (CISC) |
|
|
|
|
|
add2
$r1, $r2 |
|
|
|
|
|
semantics: |
R[1] = R[1] + R[2] |
(like
+= in C) |
|
|
|
same register used for
source AND target |
|
|
|
|
fewer bits necessary |
|
|
|
|
1-register format (accumulator) |
|
|
|
|
|
add1
$r2 |
|
|
|
|
|
semantics: |
Acc = Acc + R[2] |
|
|
|
|
accumulator: special
register used to hold results, implicit in instruction |
|
0-register format (stack) |
|
|
|
|
add0 |
|
|
semantics: |
|
|
|
Stack[Top-4] = Stack[Top]
+ Stack[Top-4] |
|
|
|
Top = Top - 4 |
|
|
replace top of stack with
sum of top 2 values |
|
|
requires push and pop
operations |
|
|
|
must go back to memory to
reuse value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|