Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2: 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,

Problem 2:

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,3), %rcx movslq %edx, %rdx leaq (%rcx,%rdi,4), %rcx addq %rcx, %rdx movq %rax, A(,%rdx,8) movl $1280, %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. (15 points each for R, S, T, 15 points for steps/calculations)

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions