07-cpu-perf-i - cornell...
TRANSCRIPT
1
2
3
4
5
6
7
8
9
10
11
For addi, sign extension and can do posi;ve and nega;ve. Will signal overflow. For addiu, s;ll use sign extension, but no overflow Add vs. addu: no overflow for addu
or, extra input to alu B mux from before/aJer extend (or, extra mux aJer alu)
20
sw r1 4(r5) sb r1, 3(r5) If you don’t make sure half word accesses are half word aligned, or word accesses are word aligned, there will be an error signaled. We will talk about traps and excep;ons later.
Comes from Gulliver travels
25
Big Endian means store MSB (most significant byte) first
26
Where � is used to concatenate Why should the offset be leJ shiJed by 2. To keep the jump address word aligned. AND to not waste two bits that we *know* are going to be 0.
Where � is used to concatenate
Why should the offset be leJ shiJed by 2. To keep the jump address word aligned. AND to not waste two bits that we *know* are going to be 0.
In the book, the ALU is used to determine the branch comparison. We are choosing to do it separately. Anyway, can’t use ALU for both branc comparison and PC determina;on. At most, we can use it once. The book uses it for branch
0x0121808 == 1185800
40
41
42
44
47
55