Question: Consider the following code, in which we have omitted the expression being computed: short scale3 (short x, short y, short z) { short t =

Consider the following code, in which we have omitted the expression being computed:

short scale3 (short x, short y, short z) { short t = return t; } Compiling the actual function with GCC

short scale3 (short x, short y, short z) { short t = return t; } Compiling the actual function with GCC yields the following assembly code: short scale3 (short x, short y, short z) x in %rdi, y in %rsi, z in %rdx scale3: leaq (%rsi,%rsi, 9), %rbx leaq (%rbx, %rdx), %rbx leaq (%rbx, %rdi, %rsi), %rbx ret Fill in the missing expression in the C code.

Step by Step Solution

3.46 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Again reverse engineering proves to be a useful way ... View full answer

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 Computer Systems A Programmers Perspective Questions!