Question: his question analyzes the following array sum function, whose first argument is a pointer to an array of integers and whose second argument is the
his question analyzes the following array sum function, whose first argument is a pointer to an array of
integers and whose second argument is the length of the array.
add: add $v $ $
beq: beq $a $ jr
addi: addi $a $a
lw: lw $t$a
add: add $v $v $t
addi: addi $a $a
beq: beq $ $ beq
jr: jr $ra
a List the data addresses referenced by this function when called on an array of length three, starting
at address A
b List the instruction address ie PC references that same function call makes, assuming add is
at address P
What is the hit rate of this call on an L data cache that is B direct mapped, with B lines?
Assume that A xEFA
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
