Question: b ) Consider the C code below, where H and J are constants declared with #define. int array 1 [ H ] [ J ]

b) Consider the C code below, where H and J are constants declared with #define. int array1[H][J]; int array2[J][H]; int copy_array(int x, int y){ array2[y][x]= arrayl[x][y]; return 1; } Suppose the above C code generates the following x86-64 assembly code: # On entry: # %edi = x # Sesi = Y # copy_array: movsla %esi, frsi movsla fedi, Srdi mova %rsi, frax salq $4, frax suba frsi, frax addq %rdi, frax leaq (&rdi, Erdi,2), Srdi addq %rsi, Srdi movl array(, rdi,4), fedx movl fedx, array2(, frax, 4) movl $1,%eax ret Add annotation to the assembly code. What are the values of H and J? H= J=

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 Programming Questions!