The code as following
call next
next:
popl %eax
- To what value does register %eax get set?
- Explain why there's no matching ret instruction to this call?
- What usful purpose does this code fragment serve?
The answer from book are the following. Which I don't understand. Is there any more detailed explainatio of this part of code?
- %eax is set to the address of popl instruction.
- This is not a true subroutine call, since the control folloe the same ordering as the instructions and the return address is popped from the stack.
- This is the only way in IA32 to get value of the program counter into an integer register.