For the following C statement write a minimal sequence of MI
For the following C statement, write a minimal sequence of MIPS
assembly instructions that does the identical operation. Assume $9 = A, $t10 = B,
and $17 is the base address of C.
A = C[0] << 4;
Solution
sequence of MIPS assembly instructions:
lw $9, 0($17) ------word from memory to register - lw - load word - $9 = memory [$17+0]
sll $9,$9,4 ------- sll - shift left logical - $9=$9 <<4 --shift left by the constant 4
