Question: Consider the source code below, where M and N are constants declared with #define. int mat1[M] [N]; int mat2[N] [M]; int sum_element(int i, int ;)

 Consider the source code below, where M and N are constants

Consider the source code below, where M and N are constants declared with #define. int mat1[M] [N]; int mat2[N] [M]; int sum_element(int i, int ;) { return matl[i][j] + mat2[i][j]; } Suppose the above code generates the following assembly code: sum_element: pushl febp movl fesp, febp movl 8 (Sebp), feax movl 12 (ebp), secx sall $2,fecx leal 0 (, Seax, 8), fedx subl Seax, fedx leal (feax, feax, 4), Seax movl mat2 (&ecx, feax, 4), feax addl matl (Secx, $edx, 4), feax movi febp, esp popl febp ret What is the value of M, N

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!