HW24
COP-3402
Draw the stack frames for the following two functions (after running main and calling
f, but beforefreturns). Remember to include- the return address,
- the old base pointer, and
- the local variables
function main localVariables retval x x := 2 retval := call f return x end function
function f localVariables x parameters x x := 3 return x end function
- Write
movinstruction(s) that implementx := 2above in functionf. - In the x86 64 System V ABI, how are parameters passed?
- The following are the contents of a stack frame, label which ones are caller created and which are callee created in the x86 64 System V ABI:
- Stack parameters
- Return address
- Local variables
- Old base pointer