Consider the following C function that calculates the sum of an array, arr, from index low to index high. Given that the
Posted: Thu Jul 14, 2022 2:12 pm
Consider the following C function that calculates the sum of an array, arr, from index low to index high. Given that the base address of arr is contained in register SsO, the variable i and sum is contained in register $SI and $s2 respectively, and the starting MIPS assembly instruction address is 1000 . int funciint low, int high). Int sum =0,1; for (1=10 w : i < high : it+l sum =3 um + arri i : seturn sumi a) Convert the code to the corresponding MIPS assembly instructions b) Convert the first 15 lines of your assembly instructions to corresponding machine code. No need to convert it to binary. c) A processor architcct makes the following claim "The maximum array size that MIPS can handle is 32, as there are only 32 possible registers in MIPS to hold data." Briefly describe how arrays are stored in MIPS. In your answer, include the instructions that are used to access arrays. Based on this, explain if the architect's claim is correct. Also, find out the maximum array index size we can have in the MIPS architecture.