Question: Consider the following 3 2 - bit assembly code for the function f which is called using f ( 2 , 3 ) - -

Consider the following 32-bit assembly code for the function f which is called using f(2,3)-- the stack is as shown at the time of the call to f. Which of the following function(s) could be compiled into the assembly code f:Question 5
Consider the following 32-bit assembly code for the function f which is called using f(2,3)--
the stack is as shown at the time of the call to f. Which of the following function(s) could be
compiled into the assembly code f:
f:
subl $16,%esp
movl 20(%esp),%edx
movl %edx, %eax
shll $3,8eax
addl %edx, %eax
subl 24(%esp), &eax
movl %eax, 12(%esp)
movl 12(%esp), &eax
addl $16,%esp
ret
long long x, long y{ volatile long z=9*y-x; return(z); }
long f(long x, long y{ volatile long z=9*x-y; return(z); }
long long x, long y{ volatile long z=y-9*x; return(z); }
long long x, long y volatile long z=x+(x3)-y; return(z); }
Consider the following 3 2 - bit assembly code

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 Programming Questions!