Question: For Loop and Array: Because the compiler has optimized some of the accesses to the array, the registers dont all correspond exactly to variables in

For Loop and Array:

For Loop and Array: Because the compiler has optimized some of the

Because the compiler has optimized some of the accesses to the array, the registers dont all correspond exactly to variables in the source code. (And the statements and instructions dont line up exactly one-toone either, so dont put too much significance in the way weve spaced the lines.) For each of the following registers, as it is used in a particular range of instructions (shown by their assembly code line number), write a C expression that corresponds to the value in the register. Your expressions should be written using the C variables mat, r, and c, together with C operators and constants; dont use register names.

accesses to the array, the registers dont all correspond exactly to variables

#define SIZE 10 prob3: pushl movl pushl pushl pushl subl movl movl leal movl addl movl movl %ebp %esp, %ebp %edi %esi %ebx $4,%esp 8 (%ebp), $1, (%eax) 40 (%eax), %ebx $ void prob3 (int mat [SIZE] [SIZE]) 2 int r, ci %eax mat [0] [0] 1; = 10 12 13 14 15 16 1, 40(%eax) $80,%eax %eax,-16(%ebp) $1, %edi for (r = 1; r

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!