This preview shows page 1. Sign up to view the full content.
Unformatted text preview: t significant bit of register $a0 is 1, i.e. 1 + 4*32 = 129 Page 3 of 6 ECE 154A Fall 2012 Problem 3 (30 points) Translate the following C code into equivalent MIPS one: for ( i = 0; i < 10; i++) b[i] = ( a[i] + a[i+10] ) << 1 ; Assume the base addresses for the arrays a and b are in $a0 and $a1, correspondingly. Do‐while constructions style (for‐loop is also okay for full credit) addi $t0, $a0, 40 LOOP: lw $t1, 0($a0) lw $t2, 40($a0) addi $a0, $a0, 4 addi $a1, $a1, 4 add $t1, $t1, $t2 sll $t1, $t1...
View Full Document
This note was uploaded on 07/08/2013 for the course ECE 154A taught by Professor Strukov during the Fall '12 term at UCSB.
- Fall '12
- Computer Architecture