Question: Consider the array indexing calculation of Example 8.25. Suppose that i, j, and k are already loaded into registers, and that As elements are integers,
Consider the array indexing calculation of Example 8.25. Suppose that i, j, and k are already loaded into registers, and that A’s elements are integers, allocated contiguously in memory on a 32-bit machine. Show, in the pseudo-assembly notation of Sidebar 5.1, the instruction sequence to load A[i, j, k] into a register. You may assume the existence of an indexed addressing mode capable of scaling by small powers of two. Assuming the final memory load is a cache hit, how many cycles is your code likely to require on a modern processor?
Step by Step Solution
3.27 Rating (156 Votes )
There are 3 Steps involved in it
The multiplications on lines 1 and 2 are likely to result in several delay slot... View full answer
Get step-by-step solutions from verified subject matter experts
