Question: In the following code snippet, where comments indicate line numbers: uint 6 4 _ t x = 2 ; uint 6 4 _ t y
In the following code snippet, where comments indicate line numbers:
uintt x ;
uintt y ;
uintt muluintt a uintt b
uintt e a b; L
return e; L
uintt compuintt n
uintt e ; L
uintt f ; L
e mulx n; L
f muln y; L
return e f; L
int main
comp; L
Draw the stack, and show where the base pointer rbp and the stack pointer rsp point right before L begins executing.
Draw the stack, and show where the base pointer rbp and the stack pointer rsp point right before the call instruction that transfers control to the mul function is executed that is after arguments have been placed in the appropriate registers What line of source code does the instruction pointer rip correspond to in this case? Note that some lines of C can expand into multiple instructions; your answer should specify the line of C code that led to the compiler producing the instruction at the address pointed to by rip.
Draw the stack right after muls prologue has finished executing. You can assume that mul was called from L
Draw the stack right after muls epilogue has finished executing, but before the ret instruction has returned control to the caller. Also state what line of C source code the instruction pointer rip corresponds to in this case. You should assume that mul was called from line L Similar to part b your answer should specify the line of C that led to the instruction pointed to by rip being produced
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
