Procedure Return Model
1. | Extract the return pointer from the stack frame. Before returning to the calling procedure, the called procedure first retrieves the return pointer from the stack and places it in r2. |
2. | Restore any callee save registers. Any of the callee save registers that have been modified are restored. |
3. | Deallocate the stack frame. The stack space that has been allocated for this procedure must be deallocated by decrementing the stack pointer. |
4. | Branch to the return pointer. A BV instruction to GR2 is used to branch back to the calling procedure. |
5. | Restore the caller save registers. Any of the caller save registers that were saved before the procedure call are restored by the calling procedure. |
Get HP-UX 11i Internals now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.