Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 8 2 pts Consider the following C code in which M and N are constants declared with #define. int arr1[M] [N]; int arr2[N] (M);
Question 8 2 pts Consider the following C code in which M and N are constants declared with #define. int arr1[M] [N]; int arr2[N] (M); void scale(int i, int j, int s) { arri[i][j] * S; arr2[j][i] * S; The following is the translation of scale's function body to x86 instructions: leaq adda movl imull movl (%rdi,%rdi,8), %rax %rsi, %rax %edx, %ecx arr1(%rax,4), %ecx %ecx, arr1(%rax,4) (%rsi,%rsi,4), %rax %rax, %rdi arr2(%rdi,4), %edx %edx, arr2(%rdi,4) leaq adda imull mov1 What are the values of Mand N? M= Question 8 2 pts Consider the following C code in which M and N are constants declared with #define. int arr1[M] [N]; int arr2[N] (M); void scale(int i, int j, int s) { arri[i][j] * S; arr2[j][i] * S; The following is the translation of scale's function body to x86 instructions: leaq adda movl imull movl (%rdi,%rdi,8), %rax %rsi, %rax %edx, %ecx arr1(%rax,4), %ecx %ecx, arr1(%rax,4) (%rsi,%rsi,4), %rax %rax, %rdi arr2(%rdi,4), %edx %edx, arr2(%rdi,4) leaq adda imull mov1 What are the values of Mand N? M=
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started