Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following source code, where R, S, and T are constants declared with #define: long int A[R][S][T]; int store_ele(int h, int i, int j,

Consider the following source code, where R, S, and T are constants declared with #define: long int A[R][S][T]; int store_ele(int h, int i, int j, long int *dest) { A[h][i][j] = *dest; return sizeof(A); } In compiling this program, GCC generates the following assembly code (with -O2): store_ele: movslq %esi, %rsi movslq %edi, %rdi movq (%rcx), %rax leaq (%rdi,%rdi,4), %rdi leaq (%rsi,%rsi,4), %rcx movslq %edx, %rdx leaq (%rcx,%rdi,4), %rcx addq %rcx, %rdx movq %rax, A(,%rdx,8) movl $1120, %eax ret Create a text file to show your work and the steps required to determine, R, S, and T. Use your reverse engineering skills to determine the values of R, S, and T, based upon the assembly code. Be sure to show all the calculations required to determine R, S, and T.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How can you influence the powers that be to make changes?

Answered: 1 week ago