Question: Solve questions 6,7,8 in C programming Disassemble the C function below on an x86_64 machine long problem3(long x, long y, long z ) { long
Solve questions 6,7,8 in C programming
Disassemble the C function below on an x86_64 machine long problem3(long x, long y, long z ) \{ long t1=yz; long t2=xt1; long t3=(t163)63; long t=t3t2; return t; \} and answer the following questions: 1) In what registers are the arguments x,y, and z passed? 2) In what register is variable t returned? 3) How many registers are involved in the execution of all the ALU operations? 4) How many bytes are allocated to the stack frame of function problem3? 5) Annotate each line of the assembly code you obtain from the compiler. 6) Modify the above code so that its return value is stored in the address t of the pointer long t as in the function prototype voidproblem3m(long*t,longx,longy,longz) 7) Disassemble the resulting C code and annotate the changes due to the memory storage of the result. In particular find out the number of registers involved in the computation of the modified C function and the number of bytes allocated to its stack frame. 8) Which function will execute faster: problem3 or problem 3m
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
