6. (20) (a) When we would like to translate the given c code into MIPS assembly code, please fill the blanks. h = A[i] A
Posted: Thu May 05, 2022 12:56 pm
6. (20) (a) When we would like to translate the given c code into MIPS assembly code, please fill the blanks. h = A A[k+j]; Assume that f,g,h,i,j variables are saved in register $s0, $s1, $s2, $s3, $s4, A is an array with integer variables (32-bit), and the base address of A is saved in register $s5, and k is saved in register $s6, and "sll" is a "shift left logical" instruction. add $t1, -- sll $t0, 2 sll $t1, 2 add $t0, add $t1, lw $t0, $t1, sub $t1 (b) From (a), when we decide to change the A array with integer variables (32-bit) into the A array with character variables(8-bit), how should we change the above assembly code? $t0 $t1