From this, you surmise that ROW and COL must have been compile-time constants. What are their values? (Hint: in order to answer this question, it helps to know how 2-dimensional arrays are stored in memory in row-major order.)

Respuesta :

Answer:

The number of ROW or row of the 2-dimensional array is 2

The number of COL or column of the 2-dimensional array is 3

Explanation:

The C source code function fetch_aval which is programmed to return an integer value was compiled to the MIPS assemble code;

fetch_aval:

andi $5, $5,0x0007

sll $6,$6,2

 sll $2,$5,3

subu $2,$2,$5

 sll $2,$2,3

 addu $2,$2,$4    

 addu $6,$6,$2

lw $2,0($6)

j $31

Where the statement "sll $6,$6,2" defines the row length of the array to be 2 (at the end of the statement) and "sll $2,$5,3" gives the column length of 3.